Documentation
    Preparing search index...

    Represents a tag in a Mustache template providing information about a tag and its characteristics.

    Parts of a tag

    >------tag------<
     {{ >  header }}
    
       >--value--<
     {{ >  header }}
    
       >S<>-key--<
     {{ >  header }}
    
    >TO<         >TC<
     {{ >  header }}
    
    >-------------------tag--------------------<
     {{ #  section }}  Hello!   {{ / section }}
    
    >---start tag----<         >----end tag----<
     {{ #  section }}  Hello!   {{ / section }}
    
                    >--content--<
     {{ #  section }}  Hello!   {{ / section }}
    
     S = sigil or tag type
     TO = tag open
     TC = tag close
    
    interface Tag {
        content: string | null;
        key: string;
        raw: boolean;
        type:
            | "block"
            | "end"
            | "inverted"
            | "parent"
            | "section"
            | "comment"
            | "implicit"
            | "partial"
            | "variable";
        value: string;
    }
    Index

    Properties

    Properties

    content: string | null

    When a tag consists of a start and end tag (e.g. a Section tag) content contains the string between the two tags. When a tag is a single tag (like a Variable tag) content will be null.

    key: string

    The value that will be used to lookup a value in context. This key will have its sigil removed, for example, if the template is "{{ &title }}" the key value is "title".

    raw: boolean

    True when the tag has either three braces (e.g. "{{{ name }}}") or an ampersand (like "{{ &name }}").

    type:
        | "block"
        | "end"
        | "inverted"
        | "parent"
        | "section"
        | "comment"
        | "implicit"
        | "partial"
        | "variable"

    The Tag type as described in the Mustache spec.

    value: string

    The string between a tag's opening "{{" and its closing "}}". If the template is "{{ #items }}" the value is "#items".