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

babel-plugin-comments

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-comments

It's a babel plugin for remove comments.

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-54.55%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-comments

Currently it's a babel plugin for remove comments.

Installation

To install babel-plugin-comments,use npm

npm install --save-dev babel-plugin-comments

or use yarn

yarn add -D babel-plugin-comments

options

  • remove (string) type specifies the type of comments you want to remove.

    Possible value:

    - none (default): nothing will be removed;
    
    - all: all comments will be removed;
    
    - line: commentline will be removed(such as: //example);
    
    - CommentLine : same as 'line';
    
    - block: commentblock will be removed(such as: /* example*/);
    
    - CommentBlock: same as 'block';
    
    

Example

babel method:

  babel.transform(code, { plugins: [[plugin, { remove: 'all' }]] })

or babel.config.js:

  plugins: [
    [
      'comments',
      {
        remove: 'line',
      }
    ],
  ]

Keywords

FAQs

Package last updated on 28 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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