🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

json-sorted-stringify

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-sorted-stringify

Alternative JSON.stringify function with sorted keys, so the output is stable.

1.0.1
latest
Source
npm
Version published
Weekly downloads
22K
29.76%
Maintainers
0
Weekly downloads
 
Created
Source

JSON Sorted Stringify

Alternative JSON.stringify function with sorted keys, so the output is stable.

Install

npm install json-sorted-stringify

Usage

import stringify from 'json-sorted-stringify';

// Let's stringify in a sorted/stable manner

stringify ({ a: 1, b: 2 }); // => '{"a":1,"b":2}'
stringify ({ b: 2, a: 1 }); // => '{"a":1,"b":2}'

License

MIT © Fabio Spampinato

Keywords

json

FAQs

Package last updated on 18 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts