Novelty Plastic Moustache
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    map-componentpublic

    map

    Map utility

    Installation

    $ component install component/map
    

    API

    map(array, fn)

    Map returning a new array:

    var names = map(users, function(user){
      return user.name;
    });

    map(array, string)

    Map properties in string returning a new array:

    var names = map(users, 'user.name');
    var firstNames = map(users, 'user.name.first');

    License

    MIT

    Keywords

    none

    install

    npm i map-component

    Downloadslast 7 days

    52

    version

    0.0.1

    license

    none

    last publish

    collaborators

    • avatar