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.1 to 1.0.2

14

index.js

@@ -108,5 +108,15 @@ /*!

// strip all by default, including `ingored` comments.
const defaults = { block: false, line: false, safe: false, first: false };
const defaults = {
// we shouldn't care about this here since our goal is to strip comments,
// not transpiling, and this has been a common cause of parsing issues
allowReturnOutsideFunction: true,
block: false,
line: false,
safe: false,
first: false,
plugins: []
};
const opts = assign({}, defaults, options);
opts.plugins = ['objectRestSpread'];
opts.plugins.push('objectRestSpread');

@@ -113,0 +123,0 @@ if (typeof opts.keepProtected !== 'boolean') {

4

package.json
{
"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.1",
"version": "1.0.2",
"homepage": "https://github.com/jonschlinkert/strip-comments",

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

"keywords": [
"babel",
"babylon",
"block",

@@ -33,0 +35,0 @@ "block comment",

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