
Strip comments from code. Remove both line comments and block comments.
npm i coffee-strip --save
var strip = require('coffee-strip');
strip( str );
Removes all comments:
###
comments like
this
###
doNothing: () ->
###
and like
this
###
# or like this
class myClass
# and like this
doNothing: () ->
strip.line( str );
Removes all line comments:
# This comment
but not block comments
###
this
comment
###
strip.block( str );
Removes all block comments:
###
this
comment
###
but not line comments
# This comment
mocha -R spec
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license