not-a-regexp.js 194 B

1234567
  1. var isRegExp = require('../internals/is-regexp');
  2. module.exports = function (it) {
  3. if (isRegExp(it)) {
  4. throw TypeError("The method doesn't accept regular expressions");
  5. } return it;
  6. };