package
Give a regex, get a robust predicate function that tests it against a string.
npm install safe-regex-testGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Give a regex, get a robust predicate function that tests it against a string. This will work even if RegExp.prototype is altered later.
npm install --save safe-regex-testvar regexTester = require('safe-regex-test');
var assert = require('assert');
var tester = regexTester('a');
assert.ok(tester('a'));
assert.notOk(tester('b'));Simply clone the repo, npm install, and run npm test
Estimated unpacked size across 14 packages.
259.0 kB
Includes dependencies.