Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 548 Bytes

.verb.md

File metadata and controls

23 lines (15 loc) · 548 Bytes

What does this do?

Takes a string and returns a new string with comments removed. Works with line comments and/or block comments. Optionally removes the first comment only or ignores protected comments.

Works with:

{%= languages() %}

Usage

By default all comments are stripped.

const strip = require('{%= name %}');
const str = strip('const foo = "bar";// this is a comment\n /* me too *\/');
console.log(str);
// => 'const foo = "bar";\n'

For more use-cases see the tests

API

{%= strip(apidocs("index.js")) %}