Alternative JSON.stringify function with sorted keys, so the output is stable.
npm install json-sorted-stringifyAlternative JSON.stringify function with sorted keys, so the output is stable.
``sh`
npm install json-sorted-stringify
`ts
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}'
``
MIT © Fabio Spampinato