mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
9 lines
208 B
TypeScript
9 lines
208 B
TypeScript
/**
|
|
* In-place adding of elements from an array to a set.
|
|
*/
|
|
export function setAddFromArray<T>(set: Set<T>, arr: T[]): void {
|
|
for (let i = 0, len = arr.length; i < len; i++) {
|
|
set.add(arr[i]);
|
|
}
|
|
}
|