Rework relay selections to use tags

This commit is contained in:
Jon Staab
2024-04-02 09:13:54 -07:00
parent 6ce09cb4c8
commit d159b94eeb
4 changed files with 193 additions and 141 deletions
+3
View File
@@ -41,6 +41,9 @@ export const stripProtocol = (url: string) => url.replace(/.*:\/\//, "")
export const ensurePlural = <T>(x: T | T[]) => (x instanceof Array ? x : [x])
export const sortBy = <T>(f: (x: T) => number, xs: T[]) =>
xs.sort((a: T, b: T) => f(a) - f(b))
export const groupBy = <T>(f: (x: T) => string, xs: T[]) => {
const r: Record<string, T[]> = {}