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'
/**
* Creates an object composed of the inverted keys and values of `object`.
* If `object` contains duplicate values, subsequent values overwrite
@@ -18,7 +16,7 @@ import baseForOwn from './.internal/baseForOwn.js'
*/
function invert(object) {
const result = {}
baseForOwn(object, (value, key) => {
Object.keys(object).forEach((value, key) => {
result[value] = key
})
return result