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 add undefined as default Sep 19, 2012
.gitignore Initial commit Sep 19, 2012
Makefile Initial commit Sep 19, 2012
Readme.md docs Sep 19, 2012
component.json add .license property to component.json Oct 28, 2012
index.js add to-function dep Sep 20, 2012
package.json add repository field to readme Aug 21, 2013

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