{"_id":"json-stable-stringify","_rev":"4207402","name":"json-stable-stringify","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2026-03-04T17:04:03.000Z","created":"2013-07-17T22:41:43.693Z","1.3.0":"2025-04-22T05:35:29.675Z","1.2.1":"2024-12-21T21:54:23.279Z","1.2.0":"2024-12-17T21:19:54.083Z","1.1.1":"2024-01-16T18:11:02.095Z","1.1.0":"2023-11-13T22:13:47.830Z","1.0.2":"2022-11-08T17:21:21.117Z","1.0.1":"2016-02-02T18:05:58.629Z","1.0.0":"2014-05-27T12:49:07.848Z","0.1.3":"2014-05-27T10:48:43.732Z","0.1.2":"2014-04-03T04:41:04.116Z","0.1.1":"2013-12-22T04:09:35.488Z","0.1.0":"2013-12-22T04:03:58.660Z","0.0.1":"2013-07-18T00:47:49.279Z","0.0.0":"2013-07-17T22:41:43.693Z"},"users":{"brianjmiller":true,"mycrobe":true,"dongguangming":true,"nttrung91":true,"h0ward":true,"famousgarkin":true,"majgis":true,"steel1990":true,"antixrist":true,"jits":true,"sebastian1118":true,"timdp":true,"monolithed":true,"chinawolf_wyp":true,"goliatone":true,"shyling":true,"sbruchmann":true,"wayn":true,"maxidev":true,"millercl":true,"floriannagel":true},"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"versions":{"1.3.0":{"name":"json-stable-stringify","version":"1.3.0","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>= 10.2' audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"homepage":"https://github.com/ljharb/json-stable-stringify","funding":{"url":"https://github.com/sponsors/ljharb"},"dependencies":{"call-bind":"^1.0.8","call-bound":"^1.0.4","isarray":"^2.0.5","jsonify":"^0.0.1","object-keys":"^1.1.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.4","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.3.2","@types/call-bind":"^1.0.5","@types/isarray":"^2.0.3","@types/object-keys":"^1.0.3","@types/tape":"^5.8.1","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.1","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"engines":{"node":">= 0.4"},"testling":{"files":"test/*.js"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","types"]},"_id":"json-stable-stringify@1.3.0","gitHead":"30eaaa1272938a54db90792ca7b3455670136ef9","types":"./index.d.ts","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"shasum":"8903cfac42ea1a0f97f35d63a4ce0518f0cc6a70","size":11822,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.3.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/json-stable-stringify_1.3.0_1745300129480_0.3579319906796061"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-04-22T05:35:29.675Z","publish_time":1745300129675,"_source_registry_name":"default","_cnpm_publish_time":1745300129675},"1.2.1":{"name":"json-stable-stringify","version":"1.2.1","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>= 10.2' audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"homepage":"https://github.com/ljharb/json-stable-stringify","funding":{"url":"https://github.com/sponsors/ljharb"},"dependencies":{"call-bind":"^1.0.8","call-bound":"^1.0.3","isarray":"^2.0.5","jsonify":"^0.0.1","object-keys":"^1.1.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.2","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/call-bind":"^1.0.5","@types/isarray":"^2.0.3","@types/object-keys":"^1.0.3","@types/tape":"^5.8.0","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.1","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"engines":{"node":">= 0.4"},"testling":{"files":"test/*.js"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","types"]},"_id":"json-stable-stringify@1.2.1","gitHead":"cbe368f21cc3da54f9567587ed97211d54f29c4e","types":"./index.d.ts","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"addb683c2b78014d0b78d704c2fcbdf0695a60e2","size":11398,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.2.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/json-stable-stringify_1.2.1_1734818063068_0.00039311129779218135"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-21T21:54:23.279Z","publish_time":1734818063279,"_source_registry_name":"default","_cnpm_publish_time":1734818063279},"1.2.0":{"name":"json-stable-stringify","version":"1.2.0","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>= 10.2' audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"homepage":"https://github.com/ljharb/json-stable-stringify","funding":{"url":"https://github.com/sponsors/ljharb"},"dependencies":{"call-bind":"^1.0.8","call-bound":"^1.0.3","isarray":"^2.0.5","jsonify":"^0.0.1","object-keys":"^1.1.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/call-bind":"^1.0.5","@types/isarray":"^2.0.3","@types/object-keys":"^1.0.3","@types/tape":"^5.7.0","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.1","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"engines":{"node":">= 0.4"},"testling":{"files":"test/*.js"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows","types"]},"_id":"json-stable-stringify@1.2.0","gitHead":"4cff539ecf0310e7a1700d5a45f339a4038f139c","types":"./index.d.ts","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"shasum":"2c974b1e9e8c0655cc32d4a7315c23bf122e3d3a","size":11263,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.2.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/json-stable-stringify_1.2.0_1734470393837_0.15552520961741023"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-17T21:19:54.083Z","publish_time":1734470394083,"_source_registry_name":"default","_cnpm_publish_time":1734470394083},"1.1.1":{"name":"json-stable-stringify","version":"1.1.1","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"call-bind":"^1.0.5","isarray":"^2.0.5","jsonify":"^0.0.1","object-keys":"^1.1.1"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.4","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.0","safe-publish-latest":"^2.0.0","tape":"^5.7.3"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"homepage":"https://github.com/ljharb/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"json-stable-stringify@1.1.1","gitHead":"eb687c156d8e87228a9fa1b2041b5ec23ca2a47a","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"_nodeVersion":"21.6.0","_npmVersion":"10.2.4","dist":{"shasum":"52d4361b47d49168bcc4e564189a42e5a7439454","size":9388,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.1.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-stable-stringify_1.1.1_1705428661889_0.26704377559004344"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-16T18:11:02.095Z","publish_time":1705428662095,"_source_registry_name":"default","_cnpm_publish_time":1705428662095},"1.1.0":{"name":"json-stable-stringify","version":"1.1.0","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"call-bind":"^1.0.5","isarray":"^2.0.5","jsonify":"^0.0.1","object-keys":"^1.1.1"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.0","safe-publish-latest":"^2.0.0","tape":"^5.7.2"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"homepage":"https://github.com/ljharb/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"json-stable-stringify@1.1.0","gitHead":"d86c3bbde4ec1a17a287d1d8239983822c4bfdb6","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"_nodeVersion":"21.1.0","_npmVersion":"10.2.0","dist":{"shasum":"43d39c7c8da34bfaf785a61a56808b0def9f747d","size":9216,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.1.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-stable-stringify_1.1.0_1699913627656_0.3565184281566487"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-13T22:13:47.830Z","publish_time":1699913627830,"_source_registry_name":"default","_cnpm_publish_time":1699913627830},"1.0.2":{"name":"json-stable-stringify","version":"1.0.2","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"^0.0.1"},"devDependencies":{"@ljharb/eslint-config":"^21.0.0","aud":"^2.0.1","auto-changelog":"^2.4.0","eslint":"=8.8.0","in-publish":"^2.0.1","npmignore":"^0.3.0","safe-publish-latest":"^2.0.0","tape":"^5.6.1"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/ljharb/json-stable-stringify.git"},"homepage":"https://github.com/ljharb/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"4fdc427435d546aba5c6d272d6edd27411388625","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"_id":"json-stable-stringify@1.0.2","_nodeVersion":"19.0.0","_npmVersion":"8.19.2","dist":{"shasum":"e06f23128e0bbe342dc996ed5a19e28b57b580e0","size":8022,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.0.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-stable-stringify_1.0.2_1667928080858_0.0998043011909664"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-11-08T17:25:31.908Z","publish_time":1667928081117,"_cnpm_publish_time":1667928081117},"1.0.1":{"name":"json-stable-stringify","version":"1.0.1","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","gitHead":"4a3ac9cc006a91e64901f8ebe78d23bf9fc9fbd0","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@1.0.1","_shasum":"9a759d39c5f2ff503fd5300646ed445f88c4f9af","_from":".","_npmVersion":"3.4.1","_nodeVersion":"4.2.1","_npmUser":{"name":"substack","email":"substack@gmail.com"},"dist":{"shasum":"9a759d39c5f2ff503fd5300646ed445f88c4f9af","size":4527,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.0.1.tgz"},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/json-stable-stringify-1.0.1.tgz_1454436356521_0.9410459187347442"},"directories":{},"publish_time":1454436358629,"_cnpm_publish_time":1454436358629,"_hasShrinkwrap":false},"1.0.0":{"name":"json-stable-stringify","version":"1.0.0","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@1.0.0","dist":{"shasum":"5e26859cf49968cfa499533413443578ee04d251","size":4490,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1401194947848,"_cnpm_publish_time":1401194947848,"_hasShrinkwrap":false},"0.1.3":{"name":"json-stable-stringify","version":"0.1.3","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@0.1.3","dist":{"shasum":"5860d0400e7a5911479248646c796b008eeb3eb9","size":3948,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-0.1.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1401187723732,"_cnpm_publish_time":1401187723732,"_hasShrinkwrap":false},"0.1.2":{"name":"json-stable-stringify","version":"0.1.2","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@0.1.2","dist":{"shasum":"cf427efa3e55a9a22ccc1e08fa866728623e4d92","size":3906,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-0.1.2.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1396500064116,"_cnpm_publish_time":1396500064116,"_hasShrinkwrap":false},"0.1.1":{"name":"json-stable-stringify","version":"0.1.1","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@0.1.1","dist":{"shasum":"d190f8784548e4cbae311db2c12804b797fb0c06","size":3801,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1387685375488,"_cnpm_publish_time":1387685375488,"_hasShrinkwrap":false},"0.1.0":{"name":"json-stable-stringify","version":"0.1.0","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@0.1.0","dist":{"shasum":"c54ac064fc16d73c4b8915d4587bcd0d6635648a","size":3508,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1387685038660,"_cnpm_publish_time":1387685038660,"_hasShrinkwrap":false},"0.0.1":{"name":"json-stable-stringify","version":"0.0.1","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@0.0.1","dist":{"shasum":"611c23e814db375527df851193db59dd2af27f45","size":2920,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1374108469279,"_cnpm_publish_time":1374108469279,"_hasShrinkwrap":false},"0.0.0":{"name":"json-stable-stringify","version":"0.0.0","description":"deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results","main":"index.js","dependencies":{"jsonify":"~0.0.0"},"devDependencies":{"tape":"~1.0.4"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":["ie/8..latest","ff/5","ff/latest","chrome/15","chrome/latest","safari/latest","opera/latest"]},"repository":{"type":"git","url":"git://github.com/substack/json-stable-stringify.git"},"homepage":"https://github.com/substack/json-stable-stringify","keywords":["json","stringify","deterministic","hash","sort","stable"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/json-stable-stringify/issues"},"_id":"json-stable-stringify@0.0.0","dist":{"shasum":"a5880cbb2068c6edb68aeb8a1c17606eab6885a4","size":2895,"noattachment":false,"key":"/json-stable-stringify/-/json-stable-stringify-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-stable-stringify/download/json-stable-stringify-0.0.0.tgz"},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1374100903693,"_cnpm_publish_time":1374100903693,"_hasShrinkwrap":false}},"readme":"# json-stable-stringify <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\ndeterministic version of `JSON.stringify()` so you can get a consistent hash from stringified results\n\nYou can also pass in a custom comparison function.\n\n# example\n\n``` js\nconst stringify = require('json-stable-stringify');\n\nconst obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };\n\nconsole.log(stringify(obj));\n```\n\noutput:\n\n```\n{\"a\":3,\"b\":[{\"x\":4,\"y\":5,\"z\":6},7],\"c\":8}\n```\n\n# methods\n\n``` js\nconst stringify = require('json-stable-stringify')\n```\n\n<a id=\"var-str--stringifyobj-opts\"></a>\n## const str = stringify(obj, opts)\n\nReturn a deterministic stringified string `str` from the object `obj`.\n\n## options\n\n### cmp\n\nIf `opts` is given, you can supply an `opts.cmp` to have a custom comparison function for object keys.\nYour function `opts.cmp` is called with these parameters:\n\n``` js\nopts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }, { get(key): value })\n```\n\nFor example, to sort on the object key names in reverse order you could write:\n\n``` js\nconst stringify = require('json-stable-stringify');\n\nconst obj = { c: 8, b: [{ z: 6, y: 5, x: 4 },7], a: 3 };\n\nconst s = stringify(obj, function (a, b) {\n\treturn b.key.localeCompare(a.key);\n});\n\nconsole.log(s);\n```\n\nwhich results in the output string:\n\n``` js\n{\"c\":8,\"b\":[{\"z\":6,\"y\":5,\"x\":4},7],\"a\":3}\n```\n\nOr if you wanted to sort on the object values in reverse order, you could write:\n\n``` js\nconst stringify = require('json-stable-stringify');\n\nconst obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 };\n\nconst s = stringify(obj, function (a, b) {\n\treturn a.value < b.value ? 1 : -1;\n});\n\nconsole.log(s);\n```\n\nwhich outputs:\n\n``` js\n{\"d\":6,\"c\":5,\"b\":[{\"z\":3,\"y\":2,\"x\":1},9],\"a\":10}\n```\n\nAn additional param `get(key)` returns the value of the key from the object being currently compared.\n\n### space\n\nIf you specify `opts.space`, it will indent the output for pretty-printing.\nValid values are strings (e.g. `{space: \\t}`) or a number of spaces\n(`{space: 3}`).\n\nFor example:\n\n```js\nconst obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } };\n\nconst s = stringify(obj, { space: '  ' });\n\nconsole.log(s);\n```\n\nwhich outputs:\n\n```\n{\n  \"a\": {\n    \"and\": [\n      1,\n      2,\n      3\n    ],\n    \"foo\": \"bar\"\n  },\n  \"b\": 1\n}\n```\n\n### replacer\n\nThe replacer parameter is a function `opts.replacer(key, value)` that behaves the same as the replacer\n[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter).\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install json-stable-stringify\n```\n\n# license\n\nMIT\n\n[package-url]: https://npmjs.org/package/json-stable-stringify\n[npm-version-svg]: https://versionbadg.es/ljharb/json-stable-stringify.svg\n[deps-svg]: https://david-dm.org/ljharb/json-stable-stringify.svg\n[deps-url]: https://david-dm.org/ljharb/json-stable-stringify\n[dev-deps-svg]: https://david-dm.org/ljharb/json-stable-stringify/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/json-stable-stringify#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/json-stable-stringify.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/json-stable-stringify.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/json-stable-stringify.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=json-stable-stringify\n[codecov-image]: https://codecov.io/gh/ljharb/json-stable-stringify/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/json-stable-stringify/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/json-stable-stringify\n[actions-url]: https://github.com/ljharb/json-stable-stringify/actions\n","_attachments":{},"homepage":"https://github.com/ljharb/json-stable-stringify","bugs":{"url":"https://github.com/ljharb/json-stable-stringify/issues"},"license":"MIT"}