Class HXStr

Haystack XStr.

Hierarchy

  • HXStr

Implements

Accessors

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 value 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 HXStr

    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.

    A dict isn't supported in filter so throw an error.

    Returns string

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

  • Make a haystack xstring.

    Parameters

    • type: string | HaysonXStr | HXStr

      The type or an hayson xstr object.

    • Optional value: string

      The value.

    Returns HXStr

    A haystack xstring.

Generated using TypeDoc