first
This commit is contained in:
14
node_modules/core-js/internals/function-bind-context.js
generated
vendored
Normal file
14
node_modules/core-js/internals/function-bind-context.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this-clause');
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var NATIVE_BIND = require('../internals/function-bind-native');
|
||||
|
||||
var bind = uncurryThis(uncurryThis.bind);
|
||||
|
||||
// optional / simple context binding
|
||||
module.exports = function (fn, that) {
|
||||
aCallable(fn);
|
||||
return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
|
||||
return fn.apply(that, arguments);
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user