Simple auth api (no db)

This commit is contained in:
2025-09-20 10:19:46 +02:00
parent 202a0420fa
commit 04eefcacfc
7 changed files with 414 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
export type StringMap<T> = {
[key: string]: T;
};
export function narrow<T>(s: T, defd: T, ...allowed: T[]): T {
if (allowed.includes(s) || s == defd) {
return s;
} else {
return defd;
}
}