lightfold
Version:
lightweight scaffolding and archiving utility CLI.
32 lines (18 loc) • 477 B
Markdown
> Check whether a variable is a regular expression
```sh
$ npm install --save is-regexp
```
```js
var isRegexp = require('is-regexp');
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
```
MIT © [Sindre Sorhus](http://sindresorhus.com)