Map a function over the values of an Object to produce a new Object with the same keys.
The API is modelled after the native Array#map method.
Installation
$ npm install --save object-map
Example
var objectMap = ; var target = foo: 1 bar: 2; var result = ;// => {foo: 1, bar: 4}
API
objectMap(target, callback[, thisArg])
target
an object who's properties are iterated usinghasOwnProperty
callback
a function producing a value of the new Object, taking three arguments:currentValue
the value currently associated with the keykey
the current keyobject
the original object passed toobjectMap
thisArg
Optional. Value to use asthis
when executingcallback
.