@n3okill/utils
Version:
Many javascript helpers
23 lines • 554 B
JavaScript
/**
* Combine multiple arrays into a single one
* @param arrays The arrays to be combined
* @returns Combined array
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.combine = combine;
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
;