Comparing version 0.1.4 to 1.0.0
# 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 @@ |
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
1
116
40397
6
52