import keys from '../../util/keys'
import baseFor from './baseFor'
import { BaseForIteratee } from './baseFor'
/**
* The base implementation of `forOwn`.
*
* @private
* @param object The object to iterate over.
* @param iteratee The function invoked per iteration.
* @return Returns `object`.
*
* @see https://github.com/lodash/lodash/blob/master/.internal/baseForOwn.js
*/
function baseForOwn<Obj = { [key: string]: any }, KeyReturn = any>(
object: Obj,
iteratee: BaseForIteratee<Obj, KeyReturn>
) {
return object && baseFor<Obj>(object, iteratee, keys)
}
export default baseForOwn