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

canonical-json

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

canonical-json - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

1

index.js

@@ -220,2 +220,1 @@

module.exports = stringify

2

index2.js

@@ -31,2 +31,2 @@

return JSON.stringify(copyObjectWithSortedKeys(object))
}
}
{
"name": "canonical-json",
"version": "0.0.3",
"version": "0.0.4",
"description": "a canonical json implementation",

@@ -10,5 +10,8 @@ "main": "index.js",

},
"repository": "",
"repository": {
"type": "git",
"url": "https://github.com/mirkokiefer/canonical-json.git"
},
"author": "Mirko Kiefer <mail@mirkokiefer.com>",
"license": "BSD"
}

@@ -22,9 +22,7 @@ #Canonical JSON

```
native JSON.stringify: 75 ms
js JSON.stringify with sorted keys: 308 ms
copy and native JSON.stringify with sorted keys: 291 ms
```
- native JSON.stringify: `75 ms`
- js JSON.stringify with sorted keys ([implementation](https://github.com/mirkok/canonical-json/blob/master/index.js)): `308 ms`
- copy and native JSON.stringify with sorted keys ([implementation](https://github.com/mirkok/canonical-json/blob/master/index2.js): `291 ms`
The tests were run in Node.js on a 2011 MacBook Pro.
Performance test source: [test/performance.js](https://github.com/mirkok/canonical-json/blob/master/test/performance.js)
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