ChemPal Documentation - v1.17.0
    Preparing search index...

    Module helpers/wikidata

    Types - Helpers

    EnglishChemical

    A chemical resolved to its English name and CAS number. Both are absent for "no match".

    Variables - Helpers

    getLocalizedNames

    Resolves a CAS number or English chemical name to its Wikidata label and aliases in another language. Cached for wikidata.ttlDays (config.json); a definitive "no match" is cached as an empty array, a failed request (undefined) is not.

    resolveEnglishChemical

    Resolves a chemical name written in English or a configured source language (see wikidata.sourceLanguages in config.json, e.g. Dutch zoutzuur) to its English name and CAS number. The term must equal a Wikidata label or alias exactly, so an unrelated top search hit is never trusted. Cached for wikidata.ttlDays; a definitive "no match" is cached as {}, a failed request (undefined) is not.