valid-reg-exp.js 189 B

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