Skip to content

Files

Latest commit

3c3e2ae · Jul 4, 2023

History

History

is-regexp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 4, 2023
Jul 4, 2023
Jul 4, 2023

is-regexp Build Status

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