JSPM

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

Stringify and format a JSON object

Package Exports

  • stringify-json-object

Readme

stringify-json-object

NPM TypeScript Coverage Status

Stringify and format a JSON object.

If I should maintain this repo, please ⭐️ GitHub stars

DM me on Twitter if you have questions or suggestions. Twitter


Installation

yarn add stringify-json-object
npm install stringify-json-object
pnpm add stringify-json-object

Usage

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> {};

Dependenciesdependencies


Dev Dependencies

  • autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.

License license

MIT