function-uncurry-this.js 365 B

1234567891011
  1. var NATIVE_BIND = require('../internals/function-bind-native');
  2. var FunctionPrototype = Function.prototype;
  3. var call = FunctionPrototype.call;
  4. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  5. module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  6. return function () {
  7. return call.apply(fn, arguments);
  8. };
  9. };