Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

strip-coffee-comments

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-coffee-comments

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

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

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

License

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

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

Keywords

strip

FAQs

Package last updated on 10 Jul 2014

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