coffee-strip

0.1.0 • Public • Published

coffee-strip NPM version

Strip comments from code. Remove both line comments and block comments.

Quickstart

 npm i coffee-strip --save

Usage

var strip = require('coffee-strip');

all comments

strip( str );

Removes all comments:

###
comments like
this
###
doNothing: () ->
    ###
    and  like
    this
    ###
 
# or like this 
class myClass
    # and like this 
    doNothing: () ->

line comments

strip.line( str );

Removes all line comments:

# This comment 

but not block comments

###
this
comment
###

block comments

strip.block( str );

Removes all block comments:

###
this
comment
###

but not line comments

# This comment 

Tests

mocha -R spec

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i coffee-strip

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • doowb
  • jonschlinkert