export function alphabetize(obj: Record): Record { const out: Record = {}; for (const key of Object.keys(obj).sort()) out[key] = obj[key]; return out; }