Remove baseForOwn from several modules.

This commit is contained in:
John-David Dalton
2017-03-04 23:26:27 -08:00
parent 17f7069d07
commit 3c2795b816
8 changed files with 31 additions and 28 deletions

View File

@@ -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)