Package Exports
- stringify-json-object
Readme
Stringify and format a JSON object.
If I should maintain this repo, please ⭐️
DM me on Twitter if you have questions or suggestions.
Installation
yarn add stringify-json-objectnpm install stringify-json-objectpnpm add stringify-json-objectUsage
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> {};Dependencies
- types-json: Type checking for JSON values
Dev Dependencies
- autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.
License 
Related Packages
- parse-json-object: Parse a typed JSON object