Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-json-minify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-json-minify - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

10

json.minify.js
/*! 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) {

2

package.json
{
"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",

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