Provides a deterministic alternative to JavaScript’s JSON.stringify, producing a consistent string from the same object so you can generate stable hashes. Useful when you need repeatable JSON output, with options for custom key comparison (opts.cmp), indentation (opts.space), and a standard JSON-style replacer.
Project status
- This source appears quiet and effectively in maintenance mode, with the last upstream push on 2021-04-11, and the most recent published updates dating back to 2016-02-02 (version 1.0.1).
- The apparent update cadence is sporadic and early-peaked, with multiple updates/releases in 2013 to 2014, then far fewer after 2014, and none shown after 2016.
AI summary generated
Recent updates
1.0.1
Release 1.0.1 includes a small change to the stable JSON stringifier implementation, plus a new regression test. The code modification adjusts how the serializer tracks previously visited objects to avoid incorrectly marking repeated, non-cyclic references as cycles.
1.0.0
This release (1.0.0) introduces significant functionality in the main stringify implementation, adding an `opts.replacer` option and changing how undefined values are handled during serialization. The provided release notes are empty, so none of these changes are documented there.
BreakingFeatures0.1.3
Release 0.1.3 was published on 2014-05-27, but no release notes were provided by the publisher. As a result, there is no documented information about new functionality, fixes, or potential breaking changes in this release.
0.1.2
Release 0.1.2 makes a small change to the core stringify behavior by invoking an object’s `toJSON()` method during serialization when available. No release notes were provided, so the documented changes section is effectively empty.
0.1.1
Release 0.1.1 adds explicit handling for cyclic object graphs during stable JSON stringification. It introduces a new option, opts.cycles, to either allow cyclic references via a placeholder or throw a TypeError by default.
BreakingFeatures0.1.0
The 0.1.0 release introduces support for pretty-printing via a new `opts.space` option that adds indentation and newlines to the deterministic string output. Release notes were not provided, so this change is not reflected in the publisher’s release notes, but it is implemented in `index.js` and covered by new tests and README documentation.
Features0.0.1
This release is a small update to json-stable-stringify that changes how the stringifier handles null values. The only behavioral change indicated by the diff is additional logic in index.js to treat null as a primitive, and the test suite is updated accordingly.
0.0.0
No release notes were provided for version 0.0.0, so the changes in this release cannot be determined from the publisher documentation. Developers should review the actual commit history or diff between tags to identify any API, behavior, or dependency changes.