Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

12 Commits

Repository files navigation

mapify

Turns any function into an array mapping

Installation

Install with component(1):

$ component install bredele/mapify

Usage

varmapify=require('mapify');varsquare=mapify(function(n){returnn*n;});square([1,2,3]);// [1,4,9]

Mapify get nicer when use with get.

vararr=[{name: 'olivier',age: '27'},{name: 'amy'age: '26'}];mapify(get('name'))(arr);// ['olivier', 'amy']

License

MIT

About

Wrap around array map and turns any function into a mapping

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages