A chemical name or synonym.
The normalized key.
normalizeChemicalName('ACETONE†'); // "acetone"
normalizeChemicalName(' Sodium Hydroxide '); // "sodium hydroxide"
export function normalizeChemicalName(name: string): string {
return name.replace(/[†‡]/g, '').replace(/\s+/g, ' ').trim().toLowerCase();
}
Normalizes a chemical name for matching: lowercase, OBIS dagger markers removed, and runs of whitespace collapsed.