mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
477 B
477 B
is-regexp
Check whether a variable is a regular expression
Install
$ npm install --save is-regexp
Usage
var isRegexp = require('is-regexp');
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
License
MIT © Sindre Sorhus