The value to validate
Type predicate indicating if the value is a valid IUPAC name
isIupacName("dipotassium;oxalate") // Returns true
isIupacName("") // Returns false
export function isIupacName(value: unknown): value is IupacName<string> {
return typeof value === 'string' && value.trim().length > 0;
}
Type guard to validate if a value is a usable IUPAC name (a non-empty string).