memoized-json-hash
Generate hashes of serializable objects. Based on json-stable-stringify
by @substack, but memoizes the intermediate strings to improve performance. This only makes sense when hashing objects that frequently contain the same objects. Furthermore, this utility assumes that the input data is immutable. In other words, the function will return wrong results if you mutate the input between invocations!
Usage:
; // const jsonHash = require('memoized-json-hash').default; ;// -> '7337b77ab6e6c7eb8e0ccd547591f6b926cec1e6' // With options... ;// -> '{"foo":"bar","bar":"baz"}'