Files
kooltab-backoffice/apps/api/src/customers/customer-name.ts
T
brammie15 314717ba3a
CI / build-and-test (push) Canceled after 0s
feat: move to V2
2026-10-29 11:21:52 +01:00

9 lines
322 B
TypeScript

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();
}