npm.io
1.1.0 • Published 9 years ago

nmap

Licence
MIT
Version
1.1.0
Deps
0
Vulns
0
Weekly
0
Stars
1

nmap

Build Status NPM Version License

(n, map) => Array.from({ length: n }, map)

Installation

npm install nmap

API

  • nmap(n: length, map: function): any[]

Examples

const nmap = require("nmap");

nmap(4, () => 0);
// → [ 0, 0, 0, 0 ]

nmap(4, i => i);
// → [ 0, 1, 2, 3 ];

License

MIT

Keywords