UNPKG

core-js

Version:
11 lines (8 loc) 238 B
'use strict'; var isRegExp = require('../internals/is-regexp'); var $TypeError = TypeError; module.exports = function (it) { if (isRegExp(it)) { throw $TypeError("The method doesn't accept regular expressions"); } return it; };