@common.js/is-regexp
v3.1.0
Published
Check if a value is a regular expression
Downloads
2
Readme
is-regexp
Check if a value is a regular expression
Install
$ npm install is-regexp
Usage
import isRegexp from 'is-regexp';
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
FAQ
Why not just use instanceof
instead of this package?
Related
- is - Type check values