jsonparse
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -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"], |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
10
844
1
1
1
28967
2