Re-work address

This commit is contained in:
Jon Staab
2024-05-16 10:07:21 -07:00
parent 08d6d93661
commit eee279cefa
9 changed files with 78 additions and 73 deletions
+2
View File
@@ -89,6 +89,8 @@ export const difference = <T>(a: T[], b: T[]) => {
return a.filter(x => !s.has(x))
}
export const remove = <T>(a: T, b: T[]) => b.filter(x => x !== a)
export const clamp = ([min, max]: [number, number], n: number) => Math.min(max, Math.max(min, n))
export const tryCatch = async <T>(f: () => Promise<T | void> | T | void, onError?: (e: Error) => void): Promise<T | void> => {