|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
477 bytes
|
| Line | |
|---|
| 1 | # is-regexp [](https://travis-ci.org/sindresorhus/is-regexp)
|
|---|
| 2 |
|
|---|
| 3 | > Check whether a variable is a regular expression
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | ## Install
|
|---|
| 7 |
|
|---|
| 8 | ```sh
|
|---|
| 9 | $ npm install --save is-regexp
|
|---|
| 10 | ```
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | ## Usage
|
|---|
| 14 |
|
|---|
| 15 | ```js
|
|---|
| 16 | var isRegexp = require('is-regexp');
|
|---|
| 17 |
|
|---|
| 18 | isRegexp('unicorn');
|
|---|
| 19 | //=> false
|
|---|
| 20 |
|
|---|
| 21 | isRegexp(/unicorn/);
|
|---|
| 22 | //=> true
|
|---|
| 23 |
|
|---|
| 24 | isRegexp(new RegExp('unicorn'));
|
|---|
| 25 | //=> true
|
|---|
| 26 | ```
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | ## License
|
|---|
| 30 |
|
|---|
| 31 | MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.