
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
remove-html-comments
Advanced tools
Remove comments in html
$ npm install --save remove-html-comments
var removeHtmlComments = require('remove-html-comments');
removeHtmlComments('<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>');
/*=> {
data: '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body></body></html>',
comments: [ '<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->' ]
} */
$ npm install --global remove-html-comments
$ remove-html-comments --help
Usage
remove-html-comments <input-path>
remove-html-comments <input-path> <output-path>
cat <input-path> | remove-html-comments
Example
remove-html-comments index.html
remove-html-comments index.html no-comments.html
cat index.html | remove-html-comments
cat index.html | remove-html-comments > no-comments.html
Options
-v, --verbose Verbose output
MIT © Steve Mao
FAQs
Remove comments in html
We found that remove-html-comments demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.