mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Remove baseForOwn from several modules.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import baseForOwn from './.internal/baseForOwn.js'
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
|
||||
@@ -24,8 +22,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
*/
|
||||
function invertBy(object, iteratee) {
|
||||
const result = {}
|
||||
baseForOwn(object, (value, key) => {
|
||||
|
||||
Object.keys(object).forEach((value, key) => {
|
||||
value = iteratee(value)
|
||||
if (hasOwnProperty.call(result, value)) {
|
||||
result[value].push(key)
|
||||
|
||||
Reference in New Issue
Block a user