Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/forEachRight.js')
-rw-r--r--tools/eslint/node_modules/lodash/forEachRight.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/eslint/node_modules/lodash/forEachRight.js b/tools/eslint/node_modules/lodash/forEachRight.js
index 17a7137cbd1..c5d6e06dc10 100644
--- a/tools/eslint/node_modules/lodash/forEachRight.js
+++ b/tools/eslint/node_modules/lodash/forEachRight.js
@@ -15,6 +15,7 @@ var arrayEachRight = require('./_arrayEachRight'),
* @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) {
@@ -23,9 +24,8 @@ var arrayEachRight = require('./_arrayEachRight'),
* // => Logs `2` then `1`.
*/
function forEachRight(collection, iteratee) {
- return (typeof iteratee == 'function' && isArray(collection))
- ? arrayEachRight(collection, iteratee)
- : baseEachRight(collection, baseIteratee(iteratee));
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, baseIteratee(iteratee, 3));
}
module.exports = forEachRight;