/home/techb158/balavpn.abdallabala.com/node_modules/safe-regex-test
NameSizeModeActions
.github/-0777rm
test/-0777rm
.eslintrc1220666editdlrm
.nycrc2160666editdlrm
CHANGELOG.md42590666editdlrm
index.d.ts960666editdlrm
index.js4050666editdlrm
LICENSE10710666editdlrm
package.json22800666editdlrm
README.md18280666editdlrm
tsconfig.json1180666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/safe-regex-test/index.js (405B)
'use strict'; var callBound = require('call-bound'); var isRegex = require('is-regex'); var $exec = callBound('RegExp.prototype.exec'); var $TypeError = require('es-errors/type'); /** @type {import('.')} */ module.exports = function regexTester(regex) { if (!isRegex(regex)) { throw new $TypeError('`regex` must be a RegExp'); } return function test(s) { return $exec(regex, s) !== null; }; };