mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: re-impl #1094
This commit is contained in:
3 files changed
+8
-3
No files matched your search
@@ -47,3 +47,8 @@ export function* paginate(page: number, numPages: number) {
|
||||
if (page < numPages - 1) yield ['last', numPages];
|
||||
}
|
||||
}
|
||||
|
||||
export function buildQueryString(obj: Record<string, any>) {
|
||||
return Object.entries(obj).filter(([key, value]) => value && !key.startsWith('__'))
|
||||
.map(([key, value]) => `${key}=${encodeURIComponent(value)}`).join('&');
|
||||
}
|
||||
Reference in new issue
Block a user