4 lines
139 B
TypeScript
4 lines
139 B
TypeScript
export function arrayPadEnd<T>(array: T[], amount: number, data: T) {
|
|
for (let i = 0; i < amount - array.length; i++) array.push(data);
|
|
}
|