mirror of
https://gitverse.ru/kpa39l/telepost.git
synced 2026-09-29 09:55:09 +00:00
13 lines
331 B
JavaScript
13 lines
331 B
JavaScript
/**
|
|
* Does `array.push` for all `items`. Needed because `array.push(...items)` throws
|
|
* "Maximum call stack size exceeded" when `items` is too big of an array.
|
|
*
|
|
* @param {any[]} array
|
|
* @param {any[]} items
|
|
*/
|
|
export function push_array(array, items) {
|
|
for (let i = 0; i < items.length; i++) {
|
|
array.push(items[i]);
|
|
}
|
|
}
|