|
|
há 3 anos atrás | |
|---|---|---|
| .. | ||
| index.js | há 3 anos atrás | |
| package.json | há 3 anos atrás | |
| readme.md | há 3 anos atrás | |
Check whether a variable is a regular expression
$ npm install --save is-regexp
var isRegexp = require('is-regexp');
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
MIT © Sindre Sorhus