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

jsum

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsum - npm Package Compare versions

Comparing version 0.1.4 to 1.0.0

1

CHANGELOG.md
# Changelog
* `1.0.0`: Fix hash collision cases (see issue #6)
* `0.1.4`: Improve performance by replacing `map`s with `for`s

@@ -3,0 +4,0 @@ * `0.1.3`: Add benchmarks

@@ -37,2 +37,5 @@ 'use strict'

return acc.join(DELIM)
} else if (typeof obj === 'string') {
// See issue #6 for details
return `"${obj}"`
}

@@ -39,0 +42,0 @@

2

package.json
{
"name": "jsum",
"version": "0.1.4",
"version": "1.0.0",
"description": "Consistent checksum calculation of JSON objects.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -67,7 +67,7 @@ # JSum

# benchmark/fixtures/medium.json (77986 bytes)
fast-json-stable-stringify x 366 ops/sec ±8.11% (66 runs sampled)
json-checksum x 200 ops/sec ±2.30% (76 runs sampled)
json-hash x 82.65 ops/sec ±1.93% (68 runs sampled)
json-stable-stringify x 384 ops/sec ±1.82% (81 runs sampled)
jsum x 822 ops/sec ±2.83% (80 runs sampled)
fast-json-stable-stringify x 645 ops/sec ±0.80% (86 runs sampled)
json-checksum x 228 ops/sec ±0.89% (82 runs sampled)
json-hash x 70.25 ops/sec ±1.89% (60 runs sampled)
json-stable-stringify x 601 ops/sec ±1.06% (86 runs sampled)
jsum x 1,196 ops/sec ±1.08% (85 runs sampled)

@@ -77,7 +77,7 @@ fastest is jsum

# benchmark/fixtures/small.json (456 bytes)
fast-json-stable-stringify x 47,956 ops/sec ±3.17% (82 runs sampled)
json-checksum x 15,424 ops/sec ±3.97% (74 runs sampled)
json-hash x 7,536 ops/sec ±2.08% (82 runs sampled)
json-stable-stringify x 32,833 ops/sec ±3.99% (76 runs sampled)
jsum x 76,765 ops/sec ±2.31% (78 runs sampled)
fast-json-stable-stringify x 64,153 ops/sec ±1.47% (88 runs sampled)
json-checksum x 20,089 ops/sec ±1.88% (87 runs sampled)
json-hash x 6,418 ops/sec ±2.13% (75 runs sampled)
json-stable-stringify x 52,923 ops/sec ±1.91% (89 runs sampled)
jsum x 89,836 ops/sec ±0.84% (88 runs sampled)

@@ -104,2 +104,4 @@ fastest is jsum

return JSON.stringify(obj.map(i => serialize(i)))
} else if(typeof obj === 'string') {
return `"${obj}"`
} else if (typeof obj === 'object' && obj !== null) {

@@ -106,0 +108,0 @@ return Object.keys(obj)

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