Add default feed loader to app

This commit is contained in:
Jon Staab
2024-10-09 09:48:08 -07:00
parent cabeba4533
commit 6e24f49384
9 changed files with 112 additions and 7 deletions
+12
View File
@@ -47,6 +47,18 @@ export const omit = <T extends Record<string, any>>(ks: string[], x: T) => {
return r
}
export const omitVals = <T extends Record<string, any>>(xs: any[], x: T) => {
const r: Record<string, any> = {}
for (const [k, v] of Object.entries(x)) {
if (!xs.includes(v)) {
r[k] = v
}
}
return r as T
}
export const pick = <T extends Record<string, any>>(ks: string[], x: T) => {
const r: T = {...x}