2311061106/frontend/node_modules/safe-regex-test
23175 b8b09fd9d4
Some checks failed
autograde-final-vibevault / check-trigger (push) Successful in 13s
autograde-final-vibevault / grade (push) Failing after 55s
完成作业
2025-12-14 16:02:40 +08:00
..
.github 完成作业 2025-12-14 16:02:40 +08:00
test 完成作业 2025-12-14 16:02:40 +08:00
.eslintrc 完成作业 2025-12-14 16:02:40 +08:00
.nycrc 完成作业 2025-12-14 16:02:40 +08:00
CHANGELOG.md 完成作业 2025-12-14 16:02:40 +08:00
index.d.ts 完成作业 2025-12-14 16:02:40 +08:00
index.js 完成作业 2025-12-14 16:02:40 +08:00
LICENSE 完成作业 2025-12-14 16:02:40 +08:00
package.json 完成作业 2025-12-14 16:02:40 +08:00
README.md 完成作业 2025-12-14 16:02:40 +08:00
tsconfig.json 完成作业 2025-12-14 16:02:40 +08: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