Files
Iliyan Angelov c67067a2a4 Mail
2025-09-14 23:24:25 +03:00

12 lines
354 B
JavaScript

'use strict';
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 new $TypeError(tryToString(argument) + ' is not a function');
};