export function normalizeCustomerName(name: string): string { return name.trim().replace(/\s+/g, ' '); } /** The key customers are matched on: names differing only in case or spacing are the same customer. */ export function customerNameKey(name: string): string { return normalizeCustomerName(name).toLowerCase(); }