Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 507 Bytes

.verb.md

File metadata and controls

20 lines (14 loc) · 507 Bytes

Why use this?

JavaScript's native Array.map() is slow, and other popular array map libraries are focused on browser compatibility, which makes them bloated or less than idea for non-browser usage. This implementation is focused on node.js usage keeping it light and fast.

Usage

var map = require('{%= name %}');

map(['a', 'b', 'c'], function(ele) {
  return ele + ele;
});
//=> ['aa', 'bb', 'cc']

map(['a', 'b', 'c'], function(ele, i) {
  return i + ele;
});
//=> ['0a', '1b', '2c']