massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / function-bind-context.js
1 var uncurryThis = require('../internals/function-uncurry-this');
2 var aCallable = require('../internals/a-callable');
3
4 var bind = uncurryThis(uncurryThis.bind);
5
6 // optional / simple context binding
7 module.exports = function (fn, that) {
8   aCallable(fn);
9   return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) {
10     return fn.apply(that, arguments);
11   };
12 };