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
    .replace(/\n|\r/g, '')
    .replace(/\\/g, '\\\\')
    .replace(/'/g, '"');


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.

Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis