is-reg-exp.js 198 B

123456789
  1. 'use strict';
  2. var toString = Object.prototype.toString
  3. , id = toString.call(/a/);
  4. module.exports = function (x) {
  5. return (x && (x instanceof RegExp || (toString.call(x) === id))) || false;
  6. };