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() %}
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
{%= strip(apidocs("index.js")) %}