Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (20 sloc) 0.401 kb

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

Jump to Line
Something went wrong with that request. Please try again.