Back to Explore

samn/json-stable-stringify

GitHub
4 watchersOpen source

Last release:

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

  • Maintenance status: The upstream last push was 2021-04-11 and the most recent tagged change shown is v1.0.1 from 2016, so the project appears quiet or in maintenance mode rather than actively maintained as of 2026-09-10.
  • Update cadence: Updates are historical and sporadic, with long gaps between versions (notably 2016, then no evidence of updates since), indicating a low or essentially halted cadence today.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

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.

    BreakingFeatures
  • 0.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.

    BreakingFeatures
  • 0.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.

    Features
  • 0.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.