JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4680
  • Score
    100M100P100Q116303F
  • License MIT

Stringify and format a JSON object.

Package Exports

  • stringify-json-object

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stringify-json-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

stringify-json-object

dependencies typescript npm

Stringify and format a JSON object.

yarn add stringify-json-object

API

import stringify, { isJSONObject, JSONObject, JSONValue, JSONArray } from "stringify-json-object";

stringify(json?: JSONValue, pretty = true) => string;

isJSONObject(json?: JSONValue) => boolean;

Types

type JSONObject = {
  [key in string]?: JSONValue
};

type JSONValue = string | number | boolean | null | JSONObject | JSONArray;

interface JSONArray extends Array<JSONValue> {};