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

    Function tryParseVersion

    • Try to parse a version from a header such as Mime-Version.

      Parses a MIME version string from the supplied text or byte buffer.

      Parameters

      • input: string | Uint8Array<ArrayBufferLike> | null | undefined

        Text or bytes to parse.

      • startIndex: number = 0

        Index into the buffer to start parsing.

      • Optionallength: number

        Number of bytes or characters to parse.

      Returns Result<MimeVersion>

      a Result; { ok: false } with a MimeError when the version cannot be parsed.