node-json-minify
Advanced tools
Comparing version 2.0.0 to 3.0.0
/*! JSON.minify() | ||
v0.2.0 (c) Kyle Simpson | ||
v3.0.0 (c) Kyle Simpson | ||
MIT License | ||
@@ -24,3 +24,3 @@ */ | ||
if (!in_string) { | ||
tmp2 = tmp2.replace(/(\n|\r|\s)*/g,""); | ||
tmp2 = tmp2.replace(/(\n|\r|\s)+/g,""); | ||
} | ||
@@ -36,2 +36,3 @@ new_str[ns++] = tmp2; | ||
if (tmp[0] == "\"" && !in_multiline_comment && !in_singleline_comment) { | ||
// perform look-behind escaping match, but | ||
// limit left-context matching to only go back | ||
@@ -41,7 +42,4 @@ // to the position of the last token match | ||
// see: https://github.com/getify/JSON.minify/issues/64 | ||
lc.lastIndex = prevFrom; | ||
tmp2 = lc.substring(prevFrom).match(/\\+$/); | ||
// perform leftward adjacent escaping match | ||
tmp2 = lc.match(/(\\)*$/); | ||
// start of string with ", or unescaped " character found to end string? | ||
@@ -48,0 +46,0 @@ if (!in_string || !tmp2 || (tmp2[0].length % 2) == 0) { |
{ | ||
"name": "node-json-minify", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "minifies blocks of JSON-like content into valid JSON by removing all whitespace *and* comments", | ||
@@ -5,0 +5,0 @@ "main": "json.minify.js", |
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
7855
122