string-escape-regex
A tiny function for escaping a string to be used as the source in a regex.
Last updated 5 years ago by fabiospampinato .
Repository · Bugs · Original npm · Tarball · package.json
$ npm install string-escape-regex 
SYNC missed versions from official npm registry.

String Escape Regex

A tiny function for escaping a string to be used as the source in a regex.

Install

npm install --save string-escape-regex

Usage

import escape from 'string-escape-regex';

escape ( 'foo()' ); // => 'foo\\(\\)'

License

MIT © Fabio Spampinato

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE