Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
12345678910111213141516171819202122232425262728293031
  1. # is-regexp [![Build Status](https://travis-ci.org/sindresorhus/is-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/is-regexp)
  2. > Check whether a variable is a regular expression
  3. ## Install
  4. ```sh
  5. $ npm install --save is-regexp
  6. ```
  7. ## Usage
  8. ```js
  9. var isRegexp = require('is-regexp');
  10. isRegexp('unicorn');
  11. //=> false
  12. isRegexp(/unicorn/);
  13. //=> true
  14. isRegexp(new RegExp('unicorn'));
  15. //=> true
  16. ```
  17. ## License
  18. MIT © [Sindre Sorhus](http://sindresorhus.com)