Interface URLSearchParams

Hierarchy

  • URLSearchParams

Methods

  • Appends a specified key/value pair as a new search parameter.

    MDN Reference

    Parameters

    • name: string
    • value: string

    Returns void

  • Deletes the given search parameter, and its associated value, from the list of all search parameters.

    MDN Reference

    Parameters

    • name: string

    Returns void

  • Returns an array of key, value pairs for every entry in the search params.

    Returns IterableIterator<[string, string]>

  • Parameters

    • callbackfn: ((value, key, parent) => void)
        • (value, key, parent): void
        • Parameters

          Returns void

    • Optional thisArg: any

    Returns void

  • Returns the first value associated to the given search parameter.

    MDN Reference

    Parameters

    • name: string

    Returns string

  • Returns all the values association with a given search parameter.

    MDN Reference

    Parameters

    • name: string

    Returns string[]

  • Returns a Boolean indicating if such a search parameter exists.

    MDN Reference

    Parameters

    • name: string

    Returns boolean

  • Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.

    MDN Reference

    Parameters

    • name: string
    • value: string

    Returns void

  • Returns a string containing a query string suitable for use in a URL. Does not include the question mark.

    Returns string