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

    Variable getCompoundDescriptionConst

    getCompoundDescription: (
        cid: PubChemCID,
    ) => Promise<PubChemDescription | undefined> = ...

    Fetches a short human-readable description of a compound (with its source) by CID via PUG-REST. Useful for surfacing a plain-language blurb in the product detail view. Cached for three days.

    Type declaration

    await getCompoundDescription(180);
    // Returns: { title: "Acetone", description: "Acetone is a manufactured chemical...",
    // source: "NCI Thesaurus", url: "https://..." }
    export const getCompoundDescription: (cid: PubChemCID) => Promise<PubChemDescription | undefined> =
    withTtlCache(getCompoundDescriptionUncached, {
    namespace: 'descriptionByCid',
    });