|
|
%!s(int64=3) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| index.js | %!s(int64=3) %!d(string=hai) anos | |
| package.json | %!s(int64=3) %!d(string=hai) anos | |
| readme.md | %!s(int64=3) %!d(string=hai) anos | |
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