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

strip-comments

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-comments - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

index.js

@@ -102,3 +102,3 @@ /*!

function stripComments(input, options, tried) {
function stripComments(input, options) {
if (typeof input !== 'string') {

@@ -111,3 +111,3 @@ throw new TypeError('expected a string');

const opts = assign({}, defaults, options);
tried = tried || 0;
opts.plugins = ['objectRestSpread'];

@@ -121,2 +121,3 @@ if (typeof opts.keepProtected !== 'boolean') {

let pos = { start: 0, end: 0, removed: 0 };
if (!comments) return input;

@@ -135,3 +136,3 @@ for (const comment of comments) {

} catch (err) {
if (options.verbose) {
if (options.silent !== true) {
throw err;

@@ -138,0 +139,0 @@ }

{
"name": "strip-comments",
"description": "Strip comments from code. Removes line comments, block comments, the first comment only, or all comments. Optionally leave protected comments unharmed.",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/jonschlinkert/strip-comments",

@@ -23,3 +23,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"babel-extract-comments": "^1.0.0"
"babel-extract-comments": "^1.0.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0"
},

@@ -26,0 +27,0 @@ "devDependencies": {

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