|
|
il y a 3 ans | |
|---|---|---|
| .. | ||
| index.d.ts | il y a 3 ans | |
| index.js | il y a 3 ans | |
| license | il y a 3 ans | |
| package.json | il y a 3 ans | |
| readme.md | il y a 3 ans | |
Check if a value is a regular expression
$ npm install is-regexp
const isRegexp = require('is-regexp');
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
MIT © Sindre Sorhus