Sha256: 5ca933653821ae52ba593356d8c761624ed66f0b40860c7648a3acf278f0596a

Contents?: true

Size: 714 Bytes

Versions: 276

Compression:

Stored size: 714 Bytes

Contents

/**
 * A faster alternative to `Function#apply`, this function invokes `func`
 * with the `this` binding of `thisArg` and the arguments of `args`.
 *
 * @private
 * @param {Function} func The function to invoke.
 * @param {*} thisArg The `this` binding of `func`.
 * @param {Array} args The arguments to invoke `func` with.
 * @returns {*} Returns the result of `func`.
 */
function apply(func, thisArg, args) {
  switch (args.length) {
    case 0: return func.call(thisArg);
    case 1: return func.call(thisArg, args[0]);
    case 2: return func.call(thisArg, args[0], args[1]);
    case 3: return func.call(thisArg, args[0], args[1], args[2]);
  }
  return func.apply(thisArg, args);
}

module.exports = apply;

Version data entries

276 entries across 274 versions & 31 rubygems

Version Path
rapid_stack-0.1.1 templates/FrontEnd/node_modules/lodash/_apply.js
rapid_stack-0.1.0 templates/FrontEnd/node_modules/lodash/_apply.js
immosquare-cleaner-0.1.60 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.59 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.58 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.57 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.56 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.55 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.54 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.53 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.52 node_modules/lodash/_apply.js
trusty-cms-6.3.1 node_modules/lodash/_apply.js
immosquare-cleaner-0.1.51 node_modules/lodash/_apply.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_apply.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_apply.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_apply.js
immosquare-cleaner-0.1.50 node_modules/lodash/_apply.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_apply.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_apply.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/_apply.js