mirror of
https://github.com/thangisme/notes.git
synced 2024-09-07 05:54:16 -04:00
.. | ||
index.js | ||
package.json | ||
readme.md |
is-regexp ![Build Status](https://travis-ci.org/sindresorhus/is-regexp.svg?branch=master)
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