You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
540 B
540 B
is-regexp 
Check if a value is a regular expression
Install
$ npm install is-regexp
Usage
const isRegexp = require('is-regexp');
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
Related
- is - Type check values
License
MIT © Sindre Sorhus