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

ajson

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ajson - npm Package Compare versions

Comparing version 0.3.0 to 0.3.2

fixture/giant.json

19

bench.js

@@ -10,3 +10,3 @@ var AJSON = require('./');

var timePerTest = 1 * 1000;
var timePerTest = 10 * 1000;
var seconds = (timePerTest / 1000);

@@ -105,2 +105,7 @@

function memory() {
var result = parseFloat((process.memoryUsage().rss / 1024 / 1024).toFixed(2));
return result + 'MB';
}
function loopBlock() {

@@ -114,2 +119,3 @@ return (loopBlockedFor / 1000) + 's event loop blocked';

console.log('Running JSON.parse benchmark');
console.log('Memory before:', memory());
testJsonParse(function(err, howMany) {

@@ -121,2 +127,4 @@ if (err) {

console.log(howMany + ' JSON.parse()s in ' + seconds + 's, ' + loopBlock());
console.log('Memory after:', memory());
console.log('--------');
callback();

@@ -127,2 +135,3 @@ });

console.log('Running AJSON.parse benchmark');
console.log('Memory before:', memory());
testAjsonParse(function(err, howMany) {

@@ -134,2 +143,4 @@ if (err) {

console.log(howMany + ' AJSON.parse()s in ' + seconds + 's, ' + loopBlock());
console.log('Memory after:', memory());
console.log('--------');
callback();

@@ -140,2 +151,3 @@ });

console.log('Running JSON.stringify benchmark');
console.log('Memory before:', memory());
testJsonStringify(function(err, howMany) {

@@ -147,2 +159,4 @@ if (err) {

console.log(howMany + ' JSON.stringify()s in ' + seconds + 's, ' + loopBlock());
console.log('Memory after:', memory());
console.log('--------');
callback();

@@ -153,2 +167,3 @@ });

console.log('Running AJSON.stringify benchmark');
console.log('Memory before:', memory());
testAjsonStringify(function(err, howMany) {

@@ -160,2 +175,4 @@ if (err) {

console.log(howMany + ' AJSON.stringify()s in ' + seconds + 's, ' + loopBlock());
console.log('Memory after:', memory());
console.log('--------');
callback();

@@ -162,0 +179,0 @@ });

4

package.json

@@ -14,6 +14,6 @@ {

},
"version": "0.3.0",
"version": "0.3.2",
"main": "./index.js",
"dependencies": {
"async-json": "0.0.2",
"async-json": "git://github.com/tim-kos/async-json.git#4aab59ee4d842fcfe8958a10f128566a9c1f14a4",
"resumer": "0.0.0",

@@ -20,0 +20,0 @@ "event-stream": "3.3.0",

@@ -7,2 +7,4 @@ AJSON

Do not yet use AJSON.parse(), as it has a much higher memory footprint than JSON.parse().
The implementation for it will be changed.

@@ -9,0 +11,0 @@ # Installation

Sorry, the diff of this file is not supported yet

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