New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

objecthash

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

objecthash

JS implementation of Ben Laurie's objecthash (https://github.com/benlaurie/objecthash)

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

objecthash

Implementation of Ben Laurie's objecthash in Javascript

Installation

npm install --save objecthash

Usage

Takes any JSON value and returns a Buffer with the SHA-256 objecthash, derived using Ben Laurie's algorithm.

A note on (the inconsistency of) numbers

Different languages treat numbers parsed from JSON differently.

Javascript treats both 1 and 1.0 as an integer, whereas Go parses all JSON numbers as 64-bit floating point numbers.

In an effort to maintain compatibility with the other implementations, this library treats all numbers as floats by default.

Keywords

FAQs

Package last updated on 09 Feb 2017

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