mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v4.4.0.
This commit is contained in:
6
forIn.js
6
forIn.js
@@ -1,6 +1,6 @@
|
||||
import baseCastFunction from './_baseCastFunction';
|
||||
import baseFor from './_baseFor';
|
||||
import keysIn from './keysIn';
|
||||
import toFunction from './_toFunction';
|
||||
|
||||
/**
|
||||
* Iterates over own and inherited enumerable properties of an object invoking
|
||||
@@ -29,7 +29,9 @@ import toFunction from './_toFunction';
|
||||
* // => logs 'a', 'b', then 'c' (iteration order is not guaranteed)
|
||||
*/
|
||||
function forIn(object, iteratee) {
|
||||
return object == null ? object : baseFor(object, toFunction(iteratee), keysIn);
|
||||
return object == null
|
||||
? object
|
||||
: baseFor(object, baseCastFunction(iteratee), keysIn);
|
||||
}
|
||||
|
||||
export default forIn;
|
||||
|
||||
Reference in New Issue
Block a user