Trilium Backend API
    Preparing search index...

    Variable parentsUntilConst

    parentsUntil: <T extends AnyNode>(
        this: Cheerio<T>,
        selector?: AcceptedFilters<Element> | null,
        filterSelector?: AcceptedFilters<Element>,
    ) => Cheerio<Element>

    Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or cheerio object.

    Type Declaration

    $('.orange').parentsUntil('#food').length;
    //=> 1