Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-json-stable-stringify

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-json-stable-stringify

deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44M
increased by3.7%
Maintainers
1
Weekly downloads
 
Created

What is fast-json-stable-stringify?

The fast-json-stable-stringify npm package is used to stringify JSON objects in a deterministic order, which is useful for tasks such as creating consistent hashes from JSON objects or ensuring consistent outputs in distributed systems. Unlike the native JSON.stringify, it guarantees the order of keys in the output string.

What are fast-json-stable-stringify's main functionalities?

Deterministic JSON.stringify

This feature allows you to convert a JSON object into a string with keys sorted in a consistent order. The code sample shows the output of stringifying an object with unordered keys.

{"c":6,"b":[4,5],"a":3}

Custom comparator

This feature enables the use of a custom comparison function to determine the order of keys. The code sample demonstrates the output when a custom comparator is used to sort keys alphabetically.

{"a":3,"b":[4,5],"c":6}

Other packages similar to fast-json-stable-stringify

Keywords

FAQs

Package last updated on 14 Dec 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc