wallet-core/node_modules/escape-string-regexp/readme.md

28 lines
552 B
Markdown
Raw Normal View History

2016-10-10 03:43:44 +02:00
# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
> Escape RegExp special characters
## Install
2017-05-27 17:36:13 +02:00
```
2016-10-10 03:43:44 +02:00
$ npm install --save escape-string-regexp
```
## Usage
```js
2017-05-27 17:36:13 +02:00
const escapeStringRegexp = require('escape-string-regexp');
2016-10-10 03:43:44 +02:00
2017-05-27 17:36:13 +02:00
const escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> 'how much \$ for a unicorn\?'
2016-10-10 03:43:44 +02:00
new RegExp(escapedString);
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)