mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Remove baseIteratee and castFunction.
This commit is contained in:
7
forIn.js
7
forIn.js
@@ -1,5 +1,4 @@
|
||||
import baseFor from './_baseFor.js';
|
||||
import castFunction from './_castFunction.js';
|
||||
import keysIn from './keysIn.js';
|
||||
|
||||
/**
|
||||
@@ -13,7 +12,7 @@ import keysIn from './keysIn.js';
|
||||
* @since 0.3.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.forInRight
|
||||
* @example
|
||||
@@ -31,9 +30,7 @@ import keysIn from './keysIn.js';
|
||||
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
|
||||
*/
|
||||
function forIn(object, iteratee) {
|
||||
return object == null
|
||||
? object
|
||||
: baseFor(object, castFunction(iteratee), keysIn);
|
||||
return object == null ? object : baseFor(object, iteratee, keysIn);
|
||||
}
|
||||
|
||||
export default forIn;
|
||||
|
||||
Reference in New Issue
Block a user