Package Exports
- json-pretty
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 (json-pretty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Simple module for producing nice JSON.
Similar to the https://www.npmjs.com/package/json-prettify CLI tool, except you can require this one in your projects.
It also alphabetizes keys, which is useful for producing meaningful diffs.
If there are JSON files in your project, it makes sense to normalize them with this module, to make version control easier.
Usage
> var jsonStringify = require('json-pretty');
undefined
> jsonStringify({a: 'b'})
'{\n "a": "b"\n}'
>