npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

is-regexp-x

2.2.0 • Public • Published

Travis status Dependency status devDependency status npm version

is-regexp-x

Is this value a JS regex?

Version: 2.2.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

module.exports(value)boolean

This method tests if a value is a regex.

Kind: Exported function
Returns: boolean - true if value is a regex; otherwise false.

Param Type Description
value * The value to test.

Example

var isRegex = require('is-regexp-x');
 
isRegex(undefined); // false
isRegex(null); // false
isRegex(false); // false
isRegex(true); // false
isRegex(42); // false
isRegex('foo'); // false
isRegex(function () {}); // false
isRegex([]); // false
isRegex({})); // false
 
isRegex(/a/g); // true
isRegex(new RegExp('a', 'g')); // true

install

npm i is-regexp-x

Downloadsweekly downloads

37

version

2.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability