json-sorted-stringify
Alternative JSON.stringify function with sorted keys, so the output is stable.
Last updated 2 years ago by fabiospampinato .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install json-sorted-stringify 
SYNC missed versions from official npm registry.

JSON Sorted Stringify

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

Install

npm install json-sorted-stringify

Usage

import stringify from 'json-sorted-stringify';

// Let's stringify in a sorted/stable manner

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

License

MIT © Fabio Spampinato

Current Tags

  • 1.0.2                                ...           latest (a year ago)

3 Versions

  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Total 4
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE