stream-json
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -16,22 +16,19 @@ /* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) | ||
var json = new Grammar(); | ||
var json = new Grammar({ | ||
main: [rule("ws"), rule("value")], | ||
ws: repeat(ws), | ||
value: [any(rule("object"), rule("array"), rule("string"), | ||
rule("number"), ["-", rule("number")], "true", "false", "null"), rule("ws")], | ||
object: ["{", rule("ws"), maybe(rule("pair"), | ||
repeat(",", rule("ws"), rule("pair"))), "}"], | ||
pair: [rule("string"), rule("ws"), ":", rule("ws"), rule("value")], | ||
array: ["[", rule("ws"), maybe(rule("value"), | ||
repeat(",", rule("ws"), rule("value"))), "]"], | ||
string: ["\"", repeat(any(plainChunk, escapedChars)), "\""], | ||
number: [any("0", [nonZero, repeat(numericChunk)]), | ||
maybe(".", repeat(numericChunk)), maybe(exponent, maybe(maybe(any("-", "+")), | ||
repeat(numericChunk)))] | ||
}); | ||
json.addRule("main", [rule("ws"), rule("value")]); | ||
json.addRule("ws", repeat(ws)); | ||
json.addRule("value", [any(rule("object"), rule("array"), rule("string"), | ||
rule("number"), ["-", rule("number")], "true", "false", "null"), rule("ws")]); | ||
json.addRule("object", ["{", rule("ws"), maybe(rule("pair"), | ||
repeat(",", rule("ws"), rule("pair"))), "}"]); | ||
json.addRule("pair", [rule("string"), rule("ws"), ":", rule("ws"), rule("value")]); | ||
json.addRule("array", ["[", rule("ws"), maybe(rule("value"), | ||
repeat(",", rule("ws"), rule("value"))), "]"]); | ||
json.addRule("string", ["\"", repeat(any(plainChunk, escapedChars)), "\""]); | ||
json.addRule("number", [any("0", [nonZero, repeat(numericChunk)]), | ||
maybe(".", repeat(numericChunk)), maybe(exponent, maybe(maybe(any("-", "+")), | ||
repeat(numericChunk))) | ||
]); | ||
json.generate(); | ||
return json; | ||
}); |
{ | ||
"name": "stream-json", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "stream-json is a collection of node.js 0.10 stream components for creating custom standard-compliant JSON processors, which requires a minimal memory footprint. It can parse JSON files far exceeding available memory. Even individual data items are streamed piece-wise. Streaming SAX-inspired event-based API is included as well.", | ||
@@ -12,3 +12,3 @@ "homepage": "http://github.com/uhop/stream-json", | ||
"dependencies": { | ||
"parser-toolkit": ">=0.0.1" | ||
"parser-toolkit": ">=0.0.2" | ||
}, | ||
@@ -15,0 +15,0 @@ "devDependencies": {}, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
192470
668
Updatedparser-toolkit@>=0.0.2