nmap

1.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i nmap

Weekly Downloads

389

Version

1.1.0

License

MIT

Last publish

Collaborators

  • mohayonao