..
2022-03-10 10:36:59 +01:00
2022-03-10 10:36:59 +01:00
2022-03-10 10:36:59 +01:00
2022-03-10 10:36:59 +01:00
2022-03-10 10:36:59 +01:00

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
  • is - Type check values

License

MIT © Sindre Sorhus