Sha256: a5d6e9016e7943a839973e149325cda1a0b38ede0eb7174ac32d98bc8f59ed17

Contents?: true

Size: 786 Bytes

Versions: 153

Compression:

Stored size: 786 Bytes

Contents

/**
 * A specialized version of `_.reduceRight` for arrays without support for
 * callback shorthands and `this` binding.
 *
 * @private
 * @param {Array} array The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {*} [accumulator] The initial value.
 * @param {boolean} [initFromArray] Specify using the last element of `array`
 *  as the initial value.
 * @returns {*} Returns the accumulated value.
 */
function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
  var length = array.length;
  if (initFromArray && length) {
    accumulator = array[--length];
  }
  while (length--) {
    accumulator = iteratee(accumulator, array[length], length, array);
  }
  return accumulator;
}

module.exports = arrayReduceRight;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
trusty-festivity-extension-2.3.30 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.29 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.29 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/lodash/internal/arrayReduceRight.js
es6_tilt-0.1.2 test/dummy/node_modules/lodash/internal/arrayReduceRight.js
es6_tilt-0.1.1 test/dummy/node_modules/lodash/internal/arrayReduceRight.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/lodash/internal/arrayReduceRight.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/lodash/internal/arrayReduceRight.js