🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

coffee-strip

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee-strip

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

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

strip

FAQs

Package last updated on 10 Feb 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