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
ilog-0.4.1 node_modules/contents/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.4.1 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.4.1 node_modules/babel/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.4.0 node_modules/babel/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.4.0 node_modules/contents/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.4.0 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.3.3 node_modules/babel/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.3.3 node_modules/contents/node_modules/lodash/internal/arrayReduceRight.js
ilog-0.3.3 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/arrayReduceRight.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/arrayReduceRight.js