function-uncurry-this.js 410 B

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