New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

sorted-json-stringify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sorted-json-stringify

Sorted version of JSON.stringify

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
134
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

sortedJSONStringify

Build Status

A function like JSON.stringify with the difference that all keys in Object are sorted by alphabetical order.

It doesn't depend on the behaviors of objects in JavaScript engine; it sorts native output of JSON.stringify.

Usage

the function accepts the same parameters as JSON.stringify, including replacer and space.

It can be used by import sortedJSONStringify from 'sorted-json-stringify' (in ES6), or window.sortedJSONStringify (from browser directly).

Changelog

  • 0.1.1 (2018/02/16) - Tune build process (create both index.js and index.min.js), reduce the size of ES5.
  • 0.1.0 (2018/01/30) - Improve performance (using AST, bypass routine in special conditions)
  • 0.0.2 (2018/01/28) - change build settings (using uglifier, add module field in package.json)
  • 0.0.1 (2018/01/28) - first release

Keywords

json

FAQs

Package last updated on 15 Feb 2018

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