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

stream-json

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-json - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

33

Grammar.js

@@ -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": {},

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