A robust & optimized ES3-compatible polyfill for the `RegExp.prototype.search` method in ECMAScript 6.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitattributes
.gitignore
.travis.yml
LICENSE-MIT.txt
README.md
package.json
regexp-prototype-search.js

README.md

ES6 RegExp.prototype.search polyfill Build status Code coverage status

A robust & optimized ES3-compatible polyfill for the RegExp.prototype.search method in ECMAScript 6.

Installation

In a browser:

<script src="regex-prototype-search.js"></script>

Via npm:

npm install regexp.prototype.search

Then, in Node.js:

require('regexp.prototype.search');

// On Windows and on Mac systems with default settings, case doesn’t matter,
// which allows you to do this instead:
require('RegExp.prototype.search');

Author

twitter/mathias
Mathias Bynens

License

This polyfill is available under the MIT license.