json-parser
Advanced tools
Comparing version 2.0.3 to 2.1.0
{ | ||
"name": "json-parser", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "JSON parser to parse JSON object and MAINTAIN comments.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -21,2 +21,3 @@ // JSON formatting | ||
let tokens = null | ||
let last = null | ||
let current = null | ||
@@ -30,2 +31,3 @@ let index | ||
last = null | ||
last_prop = UNDEFINED | ||
@@ -41,2 +43,3 @@ } | ||
tokens = | ||
last = | ||
current = | ||
@@ -72,3 +75,12 @@ reviver = null | ||
const unexpected_end = () => { | ||
throw new SyntaxError('Unexpected end of JSON input') | ||
const error = new SyntaxError('Unexpected end of JSON input') | ||
Object.assign(error, last | ||
? last.loc.end | ||
// Empty string | ||
: { | ||
line: 1, | ||
column: 0 | ||
}) | ||
throw error | ||
} | ||
@@ -83,2 +95,3 @@ | ||
last = current | ||
current = new_token | ||
@@ -85,0 +98,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13007
276