Sha256: 96fe1c6e4e2191a491e29f9a65276eed9fc28add0679623d9b81c7b0d4acb423

Contents?: true

Size: 924 Bytes

Versions: 265

Compression:

Stored size: 924 Bytes

Contents

var arrayEachRight = require('./_arrayEachRight'),
    baseEachRight = require('./_baseEachRight'),
    castFunction = require('./_castFunction'),
    isArray = require('./isArray');

/**
 * This method is like `_.forEach` except that it iterates over elements of
 * `collection` from right to left.
 *
 * @static
 * @memberOf _
 * @since 2.0.0
 * @alias eachRight
 * @category Collection
 * @param {Array|Object} collection The collection to iterate over.
 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
 * @returns {Array|Object} Returns `collection`.
 * @see _.forEach
 * @example
 *
 * _.forEachRight([1, 2], function(value) {
 *   console.log(value);
 * });
 * // => Logs `2` then `1`.
 */
function forEachRight(collection, iteratee) {
  var func = isArray(collection) ? arrayEachRight : baseEachRight;
  return func(collection, castFunction(iteratee));
}

module.exports = forEachRight;

Version data entries

265 entries across 263 versions & 29 rubygems

Version Path
optimacms-0.4.3 spec/dummy/node_modules/lodash/forEachRight.js
optimacms-0.4.2 spec/dummy/node_modules/lodash/forEachRight.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/lodash/forEachRight.js
lux_assets-0.2.11 ./node_modules/lodash/forEachRight.js
lux_assets-0.2.9 ./node_modules/lodash/forEachRight.js
lux_assets-0.2.4 ./node_modules/lodash/forEachRight.js
lux_assets-0.2.2 ./node_modules/lodash/forEachRight.js
lux_assets-0.2.1 ./node_modules/lodash/forEachRight.js
ela-4.1.2 node_modules/lodash/forEachRight.js
sumomo-0.8.4 data/sumomo/api_modules/node_modules/lodash/forEachRight.js
ela-4.1.1 node_modules/lodash/forEachRight.js
ela-4.1.0 node_modules/lodash/forEachRight.js
locomotivecms-3.4.0 app/javascript/node_modules/lodash/forEachRight.js
cortex-0.1.3 spec/dummy/node_modules/lodash/forEachRight.js
sumomo-0.8.3 data/sumomo/api_modules/node_modules/lodash/forEachRight.js
sumomo-0.8.2 data/sumomo/api_modules/node_modules/lodash/forEachRight.js
sumomo-0.8.1 data/sumomo/api_modules/node_modules/lodash/forEachRight.js
condenser-0.0.4 lib/condenser/processors/node_modules/lodash/forEachRight.js
ela-4.0.0 node_modules/lodash/forEachRight.js
ela-3.4.3 node_modules/lodash/forEachRight.js