Map utility
JavaScript
Latest commit 46c328c Oct 9, 2013 @jonathanong jonathanong Merge pull request #4 from repoify/add/repository
Add repository field to readme
Permalink
Failed to load latest commit information.
test
.gitignore
Makefile
Readme.md docs Sep 19, 2012
component.json
index.js
package.json

Readme.md

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