mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Bump to v4.12.0.
This commit is contained in:
@@ -34,9 +34,8 @@ var arrayEach = require('./_arrayEach'),
|
||||
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
||||
*/
|
||||
function forEach(collection, iteratee) {
|
||||
return (typeof iteratee == 'function' && isArray(collection))
|
||||
? arrayEach(collection, iteratee)
|
||||
: baseEach(collection, baseIteratee(iteratee));
|
||||
var func = isArray(collection) ? arrayEach : baseEach;
|
||||
return func(collection, baseIteratee(iteratee, 3));
|
||||
}
|
||||
|
||||
module.exports = forEach;
|
||||
|
||||
Reference in New Issue
Block a user