Skip to content

deterministic JSON.stringify() to get deterministic hashes from stringified results

License

Notifications You must be signed in to change notification settings

eldargab/json-stable-stringify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-stable-stringify

deterministic version of JSON.stringify() so you can get a consistent hash from stringified results.

example

var stringify = require('json-stable-stringify');
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
console.log(stringify(obj));

output:

{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}

install

via component:

component install eldargab/json-stable-stringify

license

MIT

About

deterministic JSON.stringify() to get deterministic hashes from stringified results

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%