UNPKG

242 BJavaScriptView Raw
1'use strict';
2var isRegExp = require('../internals/is-regexp');
3
4var $TypeError = TypeError;
5
6module.exports = function (it) {
7 if (isRegExp(it)) {
8 throw new $TypeError("The method doesn't accept regular expressions");
9 } return it;
10};