Class QueryParams

Wraps a URL's query parameters in an object with type conversion accessors.

Hierarchy

  • QueryParams

Methods

  • Gets a string value by key, returning undefined if the key isn't present.

    Returns

    the param value

    Parameters

    • key: string

      the param key

    Returns undefined | string

  • Gets a number value by key, returning undefined if the key isn't present.

    Returns

    the converted param value

    Parameters

    • key: string

      the param key

    Returns undefined | number

  • Returns

    true if the key is present in the params

    Parameters

    • key: string

      the param key

    Returns boolean

  • Serializes the params to a query string.

    Parameters

    • Optional path: string

      the (optional) root path to prepend to the query string

    Returns string

Generated using TypeDoc