Socket
Socket
Sign inDemoInstall

jsonparse

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

test/primitives.js

7

jsonparse.js

@@ -113,4 +113,7 @@ /*global Buffer*/

n = buffer[i];
// TODO: Handle native utf8 characters, this code assumes ASCII input
if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.string = undefined; }
if (n >= 128) {
for (var j = i; buffer[j] >= 128 && j < buffer.length; j++);
this.string += buffer.slice(i, j).toString();
i = j - 1;
} else if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.string = undefined; }
else if (n === 0x5c) { this.tState = STRING2; }

@@ -117,0 +120,0 @@ else if (n >= 0x20) { this.string += String.fromCharCode(n); }

@@ -5,3 +5,3 @@ {

"tags": ["json", "stream"],
"version": "0.0.3",
"version": "0.0.4",
"author": "Tim Caswell <tim@creationix.com>",

@@ -12,2 +12,9 @@ "repository": {

},
"devDependencies": {
"tape": "~0.1.1",
"tap": "~0.3.3"
},
"scripts": {
"test": "tap test/*.js"
},
"bugs": "http://github.com/creationix/jsonparse/issues",

@@ -14,0 +21,0 @@ "engines": ["node >= 0.2.0"],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc