Negligible Psychological Misery

    just-map-values
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.2 • Public • Published

    just-map-values

    Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

    🍦 Try it

    npm install just-map-values
    yarn add just-map-values

    Map an object, predicate updates values, receives (value, key, object)

    import map from 'just-map-values';
    
    // predicate updates values, receives (value, key, obj)
    map({a: 3, b: 5, c: 9}, (value) => value + 1); // {a: 4, b: 6, c: 10}
    map({a: 3, b: 5, c: 9}, (value, key) => value + key); // {a: 3a, b: 5b, c: 9c}
    map({a: 3, b: 5, c: 9}, (value, key, obj) => obj.b); // {a: 5, b: 5, c: 5}

    Install

    npm i just-map-values

    DownloadsWeekly Downloads

    3,425

    Version

    3.0.2

    License

    MIT

    Unpacked Size

    4.83 kB

    Total Files

    8

    Last publish

    Collaborators

    • angus-c