experiment: start implementing checks in wasm (client side only so far)

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-04-09 00:12:38 -04:00
parent 2324395ae2
commit cc1d5b71da
14 changed files with 576 additions and 20 deletions

13
web/js/xeact.mjs Normal file
View File

@@ -0,0 +1,13 @@
/**
* Generate a relative URL from `url`, appending all key-value pairs from `params` as URL-encoded parameters.
*
* @type{function(string=, Object=): string}
*/
export const u = (url = "", params = {}) => {
let result = new URL(url, window.location.href);
Object.entries(params).forEach((kv) => {
let [k, v] = kv;
result.searchParams.set(k, v);
});
return result.toString();
};