Fixed 267U.pre2

This commit is contained in:
2026-07-26 18:25:37 +09:00
parent 50bfaeafdf
commit 317d00a284
1286 changed files with 80222 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
export function query(obj) {
const params = Object.entries(obj).filter(([, v])=>Array.isArray(v) ? v.length : v !== undefined).reduce((a, [k, v])=>(a[k] = v, a), {});
return Object.entries(params).map((e)=>`${e[0]}=${encodeURIComponent(e[1])}`).join("&");
}
export function appendQuery(url, query) {
return `${url}${/\?/.test(url) ? url.endsWith("?") ? "" : "&" : "?"}${query}`;
}