Function parseAcceptCharset

  • Parses an Accept-Charset header string.

    Parameters

    • input: string

      The Accept-Charset header string.

    • strict: boolean = false

      Determines if invalid values throw errors (true) or log warnings (false). Defaults to false.

    Returns AcceptCharset[]

    An array of AcceptCharset objects, sorted by weight. Invalid ranges are ignored and not returned.