webhook-action/node_modules/is-regex
Joel Male 29d4f522f2 update modules 2022-11-10 20:43:16 +10:00
..
test update modules 2022-11-10 20:43:16 +10:00
.editorconfig Add node_modules until bundler is added 2020-08-26 09:57:08 +10:00
.eslintignore add ability to call self-signed or invalid certificate clients 2021-02-26 13:58:33 +10:00
.eslintrc Add node_modules until bundler is added 2020-08-26 09:57:08 +10:00
.nycrc update modules 2022-11-10 20:43:16 +10:00
CHANGELOG.md update modules 2022-11-10 20:43:16 +10:00
LICENSE Add node_modules until bundler is added 2020-08-26 09:57:08 +10:00
README.md update modules 2022-11-10 20:43:16 +10:00
index.js update modules 2022-11-10 20:43:16 +10:00
package.json update modules 2022-11-10 20:43:16 +10:00

README.md

is-regex Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this value a JS regex? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

var isRegex = require('is-regex');
var assert = require('assert');

assert.notOk(isRegex(undefined));
assert.notOk(isRegex(null));
assert.notOk(isRegex(false));
assert.notOk(isRegex(true));
assert.notOk(isRegex(42));
assert.notOk(isRegex('foo'));
assert.notOk(isRegex(function () {}));
assert.notOk(isRegex([]));
assert.notOk(isRegex({}));

assert.ok(isRegex(/a/g));
assert.ok(isRegex(new RegExp('a', 'g')));

Tests

Simply clone the repo, npm install, and run npm test