Nighttime Possum Meandering
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

remove-html-comments

1.0.2 • Public • Published

NPM version Build Status Dependency Status

Remove comments in html

Install

$ npm install --save remove-html-comments

Usage

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

License

MIT © Steve Mao

install

npm i remove-html-comments

Downloadsweekly downloads

831

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability