asd/asd-pc/node_modules/core-js/internals/a-callable.js
愉快的大福 eb8378e551 init
2024-11-21 11:06:22 +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');
};