mapr

map for objects

npm install mapr
3 downloads in the last week
9 downloads in the last month

mapr

Build status

Map object values and keys

Installation

node.js

$ npm install mapr

component

$ component install manuelstofer/mapr

Usage

var mapr = require('mapr'),
    map = mapr.map,
    kmap = mapr.kmap,

    obj = {
       bla: 'hello'
    };

    // map object values
    // {bla: 'HELLO'}
    map(obj, function (value, key) {
        return value.toUpperCase();
    });

    // map object keys
    // {BLA: 'hello'}
    kmap(obj, function (key, value) {
        return key.toUpperCase();
    });
npm loves you