qauMaWeb/node_modules/core-js/internals/not-a-regexp.js

11 lines
274 B
JavaScript
Raw Normal View History

2024-10-13 18:02:27 +08:00
var global = require('../internals/global');
var isRegExp = require('../internals/is-regexp');
var TypeError = global.TypeError;
module.exports = function (it) {
if (isRegExp(it)) {
throw TypeError("The method doesn't accept regular expressions");
} return it;
};