octo-deno/make/arrays.js
Christoph Diehl b25df1051a Add arrays.js
2017-04-12 23:16:44 +03:00

12 lines
223 B
JavaScript

make.arrays = {
filledArray: function (fn, limit) {
let array = [];
let size = limit || random.number(make.tinyNumber);
for (let i = 0; i < size; i++) {
array.push(fn());
}
return array;
}
}