mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Fix object coercion.
This commit is contained in:
@@ -21,8 +21,10 @@
|
||||
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
|
||||
*/
|
||||
function mapValue(object, iteratee) {
|
||||
object = Object(object)
|
||||
const result = {}
|
||||
Object.keys(Object(object)).forEach((key) => {
|
||||
|
||||
Object.keys(object).forEach((key) => {
|
||||
result[key] = iteratee(object[key], key, object)
|
||||
})
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user