JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 189826658
  • Score
    100M100P100Q269819F
  • License MIT

Escape RegExp special characters

Package Exports

  • escape-string-regexp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (escape-string-regexp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

escape-string-regexp Build Status

Escape RegExp special characters

Install

$ npm install --save escape-string-regexp

Usage

var escapeStringRegexp = require('escape-string-regexp');

var escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> how much \$ for a unicorn\?

new RegExp(escapedString);

License

MIT © Sindre Sorhus