How to use the strip-comments.block function in strip-comments

To help you get started, we’ve selected a few strip-comments examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spmjs / serve-spm / lib / parser / css2js.js View on Github external
function css2js(code) {
  return strip
    .block(code)
    .replace(/\n|\r/g, '')
    .replace(/\\/g, '\\\\')
    .replace(/'/g, '"');
}

strip-comments

Strip line and/or block comments from a string. Blazing fast, and works with JavaScript, Sass, CSS, Less.js, and a number of other languages.

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis