You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 months ago | |
---|---|---|
.. | ||
.github | 3 months ago | |
test | 3 months ago | |
.eslintrc | 3 months ago | |
.nycrc | 3 months ago | |
CHANGELOG.md | 3 months ago | |
LICENSE | 3 months ago | |
README.md | 3 months ago | |
index.js | 3 months ago | |
package.json | 3 months ago |
README.md
safe-regex-test 
Give a regex, get a robust predicate function that tests it against a string. This will work even if RegExp.prototype
is altered later.
Getting started
npm install --save safe-regex-test
Usage/Examples
var regexTester = require('safe-regex-test');
var assert = require('assert');
var tester = regexTester('a');
assert.ok(tester('a'));
assert.notOk(tester('b'));
Tests
Simply clone the repo, npm install
, and run npm test