🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

strip-json-comments

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-json-comments - npm Package Compare versions

Comparing version

to
5.0.2

4

index.js

@@ -5,4 +5,6 @@ const singleComment = Symbol('singleComment');

const stripWithoutWhitespace = () => '';
const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' ');
// Replace all characters except ASCII spaces, tabs and line endings with regular spaces to ensure valid JSON output.
const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, ' ');
const isEscaped = (jsonString, quotePosition) => {

@@ -9,0 +11,0 @@ let index = quotePosition - 1;

{
"name": "strip-json-comments",
"version": "5.0.1",
"version": "5.0.2",
"description": "Strip comments from JSON. Lets you use comments in your JSON files!",

@@ -16,2 +16,3 @@ "license": "MIT",

"types": "./index.d.ts",
"sideEffects": false,
"engines": {

@@ -18,0 +19,0 @@ "node": ">=14.16"