asd/asd-wx/node_modules/core-js/internals/a-callable.js
愉快的大福 340a467ba1 init
2024-11-21 11:32:11 +08:00

11 lines
336 B
JavaScript

var isCallable = require('../internals/is-callable');
var tryToString = require('../internals/try-to-string');
var $TypeError = TypeError;
// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
if (isCallable(argument)) return argument;
throw $TypeError(tryToString(argument) + ' is not a function');
};