Object.map >= 0.1.0

Purpose

Map an object

Syntax

Object.map ( ObjectobjFunctionfnc );

Parameters

obj

fnc

Return values

Object

Examples

var obj = {
    one   : 1,
    two   : 2,
    three : 3
};

Object.map(obj, function eachEntry(value, key, obj) {
    return value * 2;
});
>>> { one: 2, two: 4, three: 6 }

Comments