1
0

valid-reg-exp.js 173 B

12345678
  1. 'use strict';
  2. var isRegExp = require('./is-reg-exp');
  3. module.exports = function (x) {
  4. if (!isRegExp(x)) throw new TypeError(x + " is not a RegExp object");
  5. return x;
  6. };