Class HUri

Haystack URI.

Hierarchy

  • HUri

Implements

Accessors

  • get hash(): string
  • Returns string

    the fragment identifier or an empty string if it can't be found.

  • get hostname(): string
  • Returns string

    The host name or an empty string if it can't be found.

  • get pathname(): string
  • Returns string

    The pathname or an empty string if none can be found.

  • get paths(): string[]
  • Returns string[]

    The paths or an empty array if no paths can be found.

  • get port(): number
  • Returns number

    The port number being used or -1 if the port number can't be parsed for an unknown protocol.

  • get queryParams(): Record<string, string>
  • Returns Record<string, string>

    The parsed query object.

  • get scheme(): string
  • Return the scheme being used or an empty string if it can't be found.

    Returns string

Methods

  • Compares two values.

    Parameters

    • value: unknown

      The value to compare against.

    Returns number

    The sort order as negative, 0, or positive

  • Value equality check.

    Parameters

    • value: unknown

      The uri to test.

    Returns boolean

    True if the value is the same.

  • Dump the value to the local console output.

    Parameters

    • Optional message: string

      An optional message to display before the value.

    Returns HUri

    The value instance.

  • Compares the value's kind.

    Parameters

    • kind: Kind

      The kind to compare against.

    Returns boolean

    True if the kind matches.

  • Returns true if the haystack filter matches the value.

    Parameters

    • filter: string | Node

      The filter to test.

    • Optional cx: Partial<EvalContext>

      Optional haystack filter evaluation context.

    Returns boolean

    True if the filter matches ok.

  • Encodes to an encoded zinc value that can be used in a haystack filter string.

    The encoding for a haystack filter is mostly zinc but contains some exceptions.

    Returns string

    The encoded value that can be used in a haystack filter.

Generated using TypeDoc