Gogs df670eaa27 first commit 3 săptămâni în urmă
..
.github df670eaa27 first commit 3 săptămâni în urmă
test df670eaa27 first commit 3 săptămâni în urmă
.eslintrc df670eaa27 first commit 3 săptămâni în urmă
.nycrc df670eaa27 first commit 3 săptămâni în urmă
CHANGELOG.md df670eaa27 first commit 3 săptămâni în urmă
LICENSE df670eaa27 first commit 3 săptămâni în urmă
README.md df670eaa27 first commit 3 săptămâni în urmă
index.d.ts df670eaa27 first commit 3 săptămâni în urmă
index.js df670eaa27 first commit 3 săptămâni în urmă
package.json df670eaa27 first commit 3 săptămâni în urmă
tsconfig.json df670eaa27 first commit 3 săptămâni în urmă

README.md

safe-regex-test Version Badge

github actions coverage License Downloads

npm badge

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