Bump to v3.6.0.

This commit is contained in:
jdalton
2015-03-24 19:28:36 -07:00
parent ee1f12c851
commit 801ffd8adf
193 changed files with 1213 additions and 976 deletions

20
internal/createForEach.js Normal file
View File

@@ -0,0 +1,20 @@
import bindCallback from './bindCallback';
import isArray from '../lang/isArray';
/**
* Creates a function for `_.forEach` or `_.forEachRight`.
*
* @private
* @param {Function} arrayFunc The function to iterate over an array.
* @param {Function} eachFunc The function to iterate over a collection.
* @returns {Function} Returns the new each function.
*/
function createForEach(arrayFunc, eachFunc) {
return function(collection, iteratee, thisArg) {
return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection))
? arrayFunc(collection, iteratee)
: eachFunc(collection, bindCallback(iteratee, thisArg, 3));
};
}
export default createForEach;