el-beeswarm
Version:
<div style="display: flex; padding: 1rem; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; display: flex;
37 lines (20 loc) • 540 B
Markdown
> Check if a value is a regular expression
```
$ npm install is-regexp
```
```js
const isRegexp = require('is-regexp');
isRegexp('unicorn');
//=> false
isRegexp(/unicorn/);
//=> true
isRegexp(new RegExp('unicorn'));
//=> true
```
- [is](https://github.com/sindresorhus/is) - Type check values
MIT © [Sindre Sorhus](https://sindresorhus.com)