This commit is contained in:
undefined committed 2025-12-06 22:37:01 +08:00
1 parent 17ec582804
commit ddf003c4c5
3 files changed
+8 -3

No files matched your search

+5
View File
@@ -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('&');
}