Have ideas to improve npm?Join in the discussion! »

    mapr

    0.2.0 • Public • Published

    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();
        });

    Keywords

    none

    Install

    npm i mapr

    DownloadsWeekly Downloads

    1

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • avatar