substack/json-stable-stringify — pull request #9 by jimlloyd (2014-10-31 21:40:14+00:00)
Title: Add options 'pretty' and 'sortarrays' for modifying output.

Hey @substack, I needed something similar to your json-stable-stringify and object-inspect packages, but neither one had what I required. This PR to json-stable-stringify gave me what I needed. If you are open to merging it, I'll add another commit to update the readme.markdown file. And of course, I'm open to any changes you'd like to see made first.

Adding pretty:true to options will produce output more like util.inspect(), i.e. like
standard javascript.

Adding sortarrays:true will sort every array, which is sometimes useful when determinstic
results are required and array ordering is not significant.