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

decomment

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decomment - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

5

index.js

@@ -106,6 +106,3 @@ 'use strict';

if (!isHtml && (symbol === '\'' || symbol === '"' || symbol === '`')) {
var closeIdx = idx;
do {
closeIdx = text.indexOf(symbol, closeIdx + 1);
} while (closeIdx > 0 && text[closeIdx - 1] === '\\');
var closeIdx = text.indexOf(symbol, idx + 1);
if (isInsideRegEx()) {

@@ -112,0 +109,0 @@ continue;

2

package.json
{
"name": "decomment",
"version": "0.2.1",
"version": "0.2.2",
"description": "Removes comments from JSON, JavaScript, CSS and HTML.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,2 +11,9 @@ 'use strict';

describe("special slash case", function () {
it("must be ignored", function () {
expect(decomment("'\\'")).toBe("'\\'");
expect(decomment("'\\\\'")).toBe("'\\\\'");
});
});
describe("single-line gaps", function () {

@@ -13,0 +20,0 @@ it("must be removed", function () {

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