gui/ui/node_modules.bak/safe-regex-test
Snider fad16c8c76
Some checks failed
Security Scan / security (push) Failing after 34s
Test / test (push) Failing after 1m44s
chore: sync workspace dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:44:56 +00:00
..
.github chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
test chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
.eslintrc chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
.nycrc chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
CHANGELOG.md chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
index.d.ts chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
index.js chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
LICENSE chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
package.json chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
README.md chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
tsconfig.json chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00

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