npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

strip-coffee-comments

0.1.1

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:6
$ npm install strip-coffee-comments
DailyWeeklyMonthlyYearly

strip-coffee-comments NPM version

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

Install

Install with npm:

npm i strip-coffee-comments --save-dev

Usage

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

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

  • github/jonschlinkert
  • twitter/jonschlinkert

License

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


This file was generated by verb-cli on July 10, 2014.