How to use the strip-comments.line 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 airyland / vux-loader / src / libs / import-parser.js View on Github external
const rs = source.split('\n').map(function (line) {
    line = line.replace(/^\s+|\s+$/g, '')
    try {
      line = stripComments.line(line)
    } catch (e) {
    }
    return line
  }).join('\n')
  return rs

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