mimekit-ts - v1.0.0
    Preparing search index...

    Class Parameter

    Represents a MIME header parameter.

    Index
    • Creates a new MIME parameter.

      Parameters

      • name: string

        The parameter name.

      • value: string

        The parameter value.

      Returns Parameter

      name or value is null, undefined, empty, or invalid.

    • Creates a new MIME parameter using the specified charset for encoded values.

      Parameters

      • charset: string | CharsetEncoding

        The charset to use when encoding the value.

      • name: string

        The parameter name.

      • value: string

        The parameter value.

      Returns Parameter

      charset, name, or value is null, undefined, or invalid.

    name: string

    The parameter name.

    onChanged: (() => void) | null = null

    Invoked when the parameter changes.

    • get alwaysQuote(): boolean

      Whether the parameter value should always be quoted.

      Returns boolean

    • set alwaysQuote(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • Encodes this parameter and appends it to a string builder.

      Parameters

      • options: FormatOptions

        The formatting options.

      • builder: string[]

        The destination string fragments.

      • lineLength: { value: number }

        The current output line length.

      • headerEncoding: CharsetEncoding = utf8

        The charset to use for encoded parameter values.

      Returns void

    • Writes this parameter without applying header encoding.

      Parameters

      • builder: string[]

        The destination string fragments.

      Returns void

    • Serializes this parameter.

      Returns string

      A string representing this parameter.