Socket
Socket
Sign inDemoInstall

@tufjs/canonical-json

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tufjs/canonical-json

OLPC JSON canonicalization


Version published
Weekly downloads
4.2M
decreased by-10.68%
Maintainers
2
Weekly downloads
 
Created

What is @tufjs/canonical-json?

The @tufjs/canonical-json npm package is designed for creating JSON strings in a canonical format. This is particularly useful in scenarios where consistent byte representations of JSON objects are necessary, such as cryptographic operations or when comparing JSON data structures without regard to non-significant differences like whitespace or key ordering.

What are @tufjs/canonical-json's main functionalities?

Canonicalization of JSON objects

This feature allows the conversion of JavaScript objects into a canonical JSON string format, ensuring consistent ordering of object keys and formatting.

const canonicalJson = require('@tufjs/canonical-json');
const obj = { b: 1, a: 2 };
const canonicalObjStr = canonicalJson.stringify(obj);
// canonicalObjStr will be '{"a":2,"b":1}'

Other packages similar to @tufjs/canonical-json

Keywords

FAQs

Package last updated on 06 Mar 2023

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