is-regexp

2.0.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

1,052,953

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability