$ gnpm install is-regexp
Check if a value is a regular expression
$ npm install is-regexp
import isRegexp from 'is-regexp';
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
instanceof
instead of this package?Copyright 2013 - present © cnpmjs.org | Home |