How to use the regexpu.transform function in regexpu

To help you get started, we’ve selected a few regexpu 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 resugar / resugar / lib / index.js View on Github external
}

  if (options.rest !== false) {
    ast = es6restParams.transform(ast);
  }

  if (options.defaultParams !== false) {
    ast = es6defaultParams.transform(ast);
  }

  if (options.generator !== false) {
    ast = regenerator.transform(ast);
  }

  if (options.regexpu !== false) {
    ast = regexpu.transform(ast);
  }

  if (options.spread !== false) {
    ast = es6spread.transform(ast);
  }

  if (options.templates !== false) {
    ast = es6templates.transform(ast);
  }

  if (options.generator !== false && options.includeRuntime) {
    var runtime = fs.readFileSync(regenerator.runtime.path, 'utf8');
    injectRuntime(runtime, regenerator.runtime.path, ast.program);
  }

  if (options.destructuring !== false) {

regexpu

A source code transpiler that enables the use of ES2015 Unicode regular expressions in ES5.

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis