Need private packages and team management tools?Check out npm Orgs. »

is-regexp

2.1.0 • Public • Published

is-regexp Build Status

Check if a value is a regular expression

Install

$ npm install is-regexp

Usage

const isRegexp = require('is-regexp');
 
isRegexp('unicorn');
//=> false
 
isRegexp(/unicorn/);
//=> true
 
isRegexp(new RegExp('unicorn'));
//=> true

Related

  • is - Type check values

License

MIT © Sindre Sorhus

Install

npm i is-regexp

DownloadsWeekly Downloads

3,995,384

Version

2.1.0

License

MIT

Unpacked Size

2.66 kB

Total Files

5

Last publish

Collaborators

  • avatar