9 lines
322 B
TypeScript
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();
|
|
}
|