Socket
Book a DemoInstallSign in
Socket

uncomment-it

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uncomment-it

Uncomment html, js or css

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

NPM version Build Status Dependency Status

Uncomment html, js or css

NOTE: This is using regex and therefore is pretty fragile. Created for simplicity and perf reasons. Read more at https://github.com/sindresorhus/comment-regex/issues/1.

HINT: In order to make it work properly adjust some space around the comments might help.

Install

$ npm install --save uncomment-it

Usage

var uncommentIt = require('uncomment-it');

uncommentIt('<!--<div>a div</div>-->', 'html');
//=> <div>a div</div>

uncommentIt('// var test = \'test\'', 'js');
//=> var test = 'test'

uncommentIt('/*body {background: blue}*/', 'css');
//=> body {background: blue}
$ npm install --global uncomment-it
$ uncomment-it --help

  Usage
    uncomment-it <input-path> <type>
    uncomment-it <input-path> <type> <output-path>
    cat <input-path> | uncomment-it <type>

  Example
    uncomment-it index.html html
    uncomment-it index.js js uncommented.html
    cat index.css | uncomment-its css
    cat index.html | uncomment-it html > uncommented.html

  Options
    -v, --verbose    Verbose output

License

MIT © Steve Mao

Keywords

uncomment-it

FAQs

Package last updated on 15 Jun 2015

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