New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

clean-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

clean-comments

To remove comments for js/css/c/c++ and more

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

clean-comments

To remove comments for js/css/c/c++ and more

用于清除类c语言的注释

安装 Install

npm i clean-comments -S

使用 Usage

const cleanComments = require('clean-comments');

cleanComments(code, options);
const { readFileSync } = require('fs');
const cleanComments = require('clean-comments');

const code = readFileSync('./file.js', 'utf-8');

const cleanedCode = cleanComments(code);

配置项 Options

  • onlyBlock
    • Only remove the block comments
    • type : boolean
  • onlyLine
    • Only remove the line comments
    • type : boolean

Keywords

comments

FAQs

Package last updated on 19 Jun 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