Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/component/map

Map utility
https://github.com/component/map

Last synced: 13 days ago
JSON representation

Map utility

Awesome Lists containing this project

README

        

# map

Map utility

## Installation

$ component install component/map

## API

### map(array, fn)

Map returning a new array:

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

### map(array, string)

Map properties in `string` returning a new array:

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

# License

MIT