terminal-cv/node_modules/core-js/internals/function-bind-context.js
greg 4d1d2f8c52
Some checks failed
continuous-integration/drone Build is failing
maj
2023-06-11 20:17:11 +02:00

13 lines
386 B
JavaScript

var uncurryThis = require('../internals/function-uncurry-this');
var aCallable = require('../internals/a-callable');
var bind = uncurryThis(uncurryThis.bind);
// optional / simple context binding
module.exports = function (fn, that) {
aCallable(fn);
return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) {
return fn.apply(that, arguments);
};
};