refactor(memory): extract sync + status helpers

This commit is contained in:
Peter Steinberger
2026-01-18 07:02:14 +00:00
parent d3b15c6afa
commit c9c9516206
10 changed files with 532 additions and 321 deletions

View File

@@ -0,0 +1,16 @@
function normalizeHeaderName(name: string): string {
return name.trim().toLowerCase();
}
export function fingerprintHeaderNames(headers: Record<string, string> | undefined): string[] {
if (!headers) return [];
const out: string[] = [];
for (const key of Object.keys(headers)) {
const normalized = normalizeHeaderName(key);
if (!normalized) continue;
out.push(normalized);
}
out.sort((a, b) => a.localeCompare(b));
return out;
}