map-component

0.0.1 • Public • Published

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

/map-component/

    Package Sidebar

    Install

    npm i map-component

    Weekly Downloads

    7

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • tjholowaychuk