@n3okill/utils
Version:
Many javascript helpers
20 lines • 457 B
JavaScript
/**
* Combine multiple arrays into a single one
* @param arrays The arrays to be combined
* @returns Combined array
*/
export function combine(...arrays) {
const target = [];
for (const arr of arrays) {
if (Array.isArray(arr)) {
for (const a of arr) {
target.push(a);
}
}
else {
target.push(arr);
}
}
return target;
}
//# sourceMappingURL=combine.js.map