json-sorted-stringify
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

JSON Sorted Stringify

Alternative JSON.stringify function with sorted keys, so the output is stable.

Install

npm install --save json-sorted-stringify

Usage

import stringify from 'json-sorted-stringify';

stirngify ({ a: 1, b: 2 }); // => '{"a":1,"b":2}'
stirngify ({ b: 2, a: 1 }); // => '{"a":1,"b":2}'

License

MIT © Fabio Spampinato

Package Sidebar

Install

npm i json-sorted-stringify

Weekly Downloads

27,560

Version

1.0.0

License

none

Unpacked Size

5.53 kB

Total Files

10

Last publish

Collaborators

  • fabiospampinato