|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
- var arrayEach = require('./_arrayEach'),
- baseEach = require('./_baseEach'),
- castFunction = require('./_castFunction'),
- isArray = require('./isArray');
-
-
- function forEach(collection, iteratee) {
- var func = isArray(collection) ? arrayEach : baseEach;
- return func(collection, castFunction(iteratee));
- }
-
- module.exports = forEach;
|