uni-ticket-system/node_modules/core-js/internals/a-callable.js

11 lines
336 B
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
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');
};