(collection, callback, thisArg)
| 37226 | * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) |
| 37227 | */ |
| 37228 | var forOwn = function(collection, callback, thisArg) { |
| 37229 | var index, iterable = collection, result = iterable; |
| 37230 | if (!iterable) return result; |
| 37231 | if (!objectTypes[typeof iterable]) return result; |
| 37232 | callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3); |
| 37233 | var ownIndex = -1, |
| 37234 | ownProps = objectTypes[typeof iterable] && keys(iterable), |
| 37235 | length = ownProps ? ownProps.length : 0; |
| 37236 | |
| 37237 | while (++ownIndex < length) { |
| 37238 | index = ownProps[ownIndex]; |
| 37239 | if (callback(iterable[index], index, collection) === false) return result; |
| 37240 | } |
| 37241 | return result |
| 37242 | }; |
| 37243 | |
| 37244 | /** |
| 37245 | * This method is like `_.forOwn` except that it iterates over elements |
no test coverage detected