strip-comments
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -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": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
15022
149
0
2
+ Addedbabel-plugin-syntax-object-rest-spread@6.13.0(transitive)
+ Addedbabel-plugin-transform-object-rest-spread@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)