Sha256: 139a04988fed27807d7b9b2457a6ca6a772e4551a0d2dc0d516f592870466482

Contents?: true

Size: 709 Bytes

Versions: 422

Compression:

Stored size: 709 Bytes

Contents

// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function(fn, args, that){
  var un = that === undefined;
  switch(args.length){
    case 0: return un ? fn()
                      : fn.call(that);
    case 1: return un ? fn(args[0])
                      : fn.call(that, args[0]);
    case 2: return un ? fn(args[0], args[1])
                      : fn.call(that, args[0], args[1]);
    case 3: return un ? fn(args[0], args[1], args[2])
                      : fn.call(that, args[0], args[1], args[2]);
    case 4: return un ? fn(args[0], args[1], args[2], args[3])
                      : fn.call(that, args[0], args[1], args[2], args[3]);
  } return              fn.apply(that, args);
};

Version data entries

422 entries across 50 versions & 9 rubygems

Version Path
sequenceserver-1.1.0.beta7 public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
sequenceserver-1.1.0.beta7 public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta6 public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
sequenceserver-1.1.0.beta6 public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta5 public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta5 public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
sequenceserver-1.1.0.beta4 public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
sequenceserver-1.1.0.beta4 public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta3 public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
sequenceserver-1.1.0.beta3 public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta2 public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
sequenceserver-1.1.0.beta2 public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta public/vendor/npm/core-js@1.1.2/library/modules/$.invoke.js
sequenceserver-1.1.0.beta public/vendor/npm/core-js@1.1.2/modules/$.invoke.js
affiliator-0.2.1 node_modules/core-js/modules/_invoke.js
affiliator-0.2.1 node_modules/core-js/library/modules/_invoke.js
lanes-0.8.0 node_modules/core-js/modules/$.invoke.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/modules/_invoke.js
lanes-0.8.0 node_modules/core-js/library/modules/$.invoke.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/library/modules/_invoke.js