A supplier class's static supplierName
The class name (e.g. "SupplierCarolina"), or undefined for a name the
registry doesn't list (disabled suppliers, test doubles)
supplierClassNameFor('Carolina'); // => "SupplierCarolina"
supplierClassNameFor('Nope'); // => undefined
export function supplierClassNameFor(displayName: string): string | undefined {
classNameByDisplayName ??= new Map(
Object.entries(SUPPLIER_META).map(([className, meta]) => [meta.displayName, className]),
);
return classNameByDisplayName.get(displayName);
}
Resolves a supplier's real class name from its
static supplierName. Production builds minify class names to single letters, soconstructor.namecan't identify a supplier there; the generated registry is keyed by the real name and survives minification.