Projects STRLCPY kitsec-core Files
🤬
32 lines | UTF-8 | 477 bytes

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

Please wait...
Page is in error, reload to recover