nmap (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