mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Bump to v4.2.1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# lodash.foreach v4.2.0
|
||||
# lodash.foreach v4.2.1
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.forEach` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var forEach = require('lodash.foreach');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.foreach) for more details.
|
||||
See the [documentation](https://lodash.com/docs#forEach) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.foreach) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.2.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
@@ -47,6 +47,7 @@ function arrayEach(array, iteratee) {
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
||||
* @returns {Array|Object} Returns `collection`.
|
||||
* @see _.forEachRight
|
||||
* @example
|
||||
*
|
||||
* _([1, 2]).forEach(function(value) {
|
||||
@@ -60,9 +61,8 @@ function arrayEach(array, iteratee) {
|
||||
* // => 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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.foreach",
|
||||
"version": "4.2.0",
|
||||
"version": "4.2.1",
|
||||
"description": "The lodash method `_.forEach` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user