Repeats an array given times.
This is part of package extra-array.
This is browserified, minified version of @extra-array/repeat.
It is exported as global variable array_repeat.
CDN: unpkg, jsDelivr.
array.repeat(x, [n]);
// x: an array
// n: times (1)
const array = require("extra-array");
var x = [1, 2];
array.repeat(x, 2);
// [ 1, 2, 1, 2 ]
array.repeat(x, 3);
// [ 1, 2, 1, 2, 1, 2 ]