tree: e8eae88e6b8fec8dae01df4a63074c56f3a6bb4d [path history] [tgz]
  1. index.d.ts
  2. index.js
  3. license
  4. package.json
  5. readme.md
node_modules/is-regexp/readme.md

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