blob: b45c7fa6d1147031696dd87d6ec61a398d8188a8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
export function choose<U, T extends Record<string, U>>(
value: keyof T,
choices: T,
): U {
return choices[value]
}
export function dedupArray<T>(arr: T[]): T[] {
const s = new Set(arr)
return [...s]
}
|