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

non-blocking-json

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

non-blocking-json - npm Package Compare versions

Comparing version 1.1.0-1596109441858 to 1.1.0-1596113581708

28

es/index.js

@@ -23,13 +23,11 @@ import { __awaiter } from "tslib";

let tickLength = 0;
tick(() => {
while (currentLength && tickLength < BATCH_LENGTH) {
const queueItem = queue.shift();
queueItem.cb();
tickLength += queueItem.length;
currentLength -= queueItem.length;
}
if (queue.length) {
run();
}
});
while (currentLength && tickLength < BATCH_LENGTH) {
const queueItem = queue.shift();
queueItem.cb();
tickLength += queueItem.length;
currentLength -= queueItem.length;
}
if (queue.length) {
tick(run);
}
}

@@ -187,3 +185,4 @@ return (length, cb) => {

const startIndex = index * BATCH_LENGTH;
for (let charIndex = startIndex; charIndex < startIndex + length; charIndex++) {
let endIndex = startIndex + length;
for (let charIndex = startIndex; charIndex < endIndex; charIndex++) {
if (value[charIndex] === '"' && value[charIndex - 1] !== '\\') {

@@ -205,3 +204,4 @@ isInString = !isInString;

const id = `$$REF_${refId++}`;
references[id] = value.substr(openingBracketIndex, charIndex - openingBracketIndex + 1);
const ref = value.substr(openingBracketIndex, charIndex - openingBracketIndex + 1);
references[id] = ref;
value =

@@ -212,2 +212,3 @@ value.substr(0, openingBracketIndex) +

charIndex = openingBracketIndex + id.length + 1;
endIndex += id.length;
}

@@ -223,2 +224,3 @@ else if (value[charIndex] === "]") {

charIndex = openingBracketIndex + id.length + 1;
endIndex += id.length;
}

@@ -225,0 +227,0 @@ }

@@ -25,13 +25,11 @@ "use strict";

let tickLength = 0;
tick(() => {
while (currentLength && tickLength < BATCH_LENGTH) {
const queueItem = queue.shift();
queueItem.cb();
tickLength += queueItem.length;
currentLength -= queueItem.length;
}
if (queue.length) {
run();
}
});
while (currentLength && tickLength < BATCH_LENGTH) {
const queueItem = queue.shift();
queueItem.cb();
tickLength += queueItem.length;
currentLength -= queueItem.length;
}
if (queue.length) {
tick(run);
}
}

@@ -190,3 +188,4 @@ return (length, cb) => {

const startIndex = index * BATCH_LENGTH;
for (let charIndex = startIndex; charIndex < startIndex + length; charIndex++) {
let endIndex = startIndex + length;
for (let charIndex = startIndex; charIndex < endIndex; charIndex++) {
if (value[charIndex] === '"' && value[charIndex - 1] !== '\\') {

@@ -208,3 +207,4 @@ isInString = !isInString;

const id = `$$REF_${refId++}`;
references[id] = value.substr(openingBracketIndex, charIndex - openingBracketIndex + 1);
const ref = value.substr(openingBracketIndex, charIndex - openingBracketIndex + 1);
references[id] = ref;
value =

@@ -215,2 +215,3 @@ value.substr(0, openingBracketIndex) +

charIndex = openingBracketIndex + id.length + 1;
endIndex += id.length;
}

@@ -226,2 +227,3 @@ else if (value[charIndex] === "]") {

charIndex = openingBracketIndex + id.length + 1;
endIndex += id.length;
}

@@ -228,0 +230,0 @@ }

{
"name": "non-blocking-json",
"version": "1.1.0-1596109441858",
"version": "1.1.0-1596113581708",
"description": "Async JSON parse and stringify",

@@ -5,0 +5,0 @@ "author": "Christian Alfoni <christianalfoni@gmail.com>",

Sorry, the diff of this file is not supported yet

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