frontend(store): rework store/sync and API client, add service tests

This commit is contained in:
Andras Schmelczer 2026-05-31 10:49:26 +01:00
parent d50aa53a73
commit 85d565ba7b
7 changed files with 636 additions and 150 deletions

View file

@ -16,5 +16,5 @@ export function hash(s: string): number {
h = ((h << 5) - h + s.charCodeAt(i)) | 0;
}
// Map the signed int32 to [0, 1) — same formula as legacy
return h / (Math.pow(2, 32) - 2) + 0.5;
return h / (2 ** 32 - 2) + 0.5;
}