Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

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

5,704,650

Version

2.1.0

License

MIT

Unpacked Size

2.66 kB

Total Files

5

Last publish

Collaborators

  • avatar