Class ChURIQuery<TCharge>

Charged search parameters representing a query string of the URI.

Type Parameters

Hierarchy

Constructors

  • Constructs search parameters.

    Type Parameters

    Parameters

    • params: string | Iterable<readonly [string, undefined | null | string]> | Readonly<Record<string, undefined | null | string>>

      Either a string containing parameters to parse (a prefix symbol is ignored), an iterable of key/value pairs representing string parameter values, or a record of string keys and string values.

    • parser: ((this, rawValues, name, params) => TCharge) = ...

      Parser of parameter charges.

        • (this, rawValues, name, params): TCharge
        • Parameters

          • this: void
          • rawValues: string[]
          • name: null | string
          • params: ChURIParams<TCharge>

          Returns TCharge

    Returns ChURIQuery<TCharge>

Accessors

  • get arg(): TCharge
  • Obtains positional argument.

    The very first parameter is treated as positional argument unless it contains an equals sign (= (U+003D)), i.e. the first named parameter name and value.

    Returns TCharge

Methods

  • Iterates over all key/value pairs contained in this object. The key and value of each pair are string objects.

    The same as entries.

    Returns IterableIterator<[string, string]>

    An iterable iterator of parameter name/value pairs in order of their appearance.

  • Iterates over all values contained in this object via a callback function.

    Parameters

    • callback: ((value, key, parent) => void)

      Function to execute on each element. Accepts parameter name, string parameter value, and this instance as arguments.

        • (value, key, parent): void
        • Parameters

          • value: string
          • key: string
          • parent: ChURIParams<TCharge>

          Returns void

    Returns void

  • Iterates over all keys contained in this object. The keys are string objects.

    Returns IterableIterator<string>

    An iterable iterator of parameter names in order of their appearance. Note that the same parameter name may be reported multiple times.

Generated using TypeDoc