Documentation Home
This page describes a pre-release version of Jasmine (6.0.0-alpha.0). There may be additional changes, including breaking changes, before the final 6.0.0 release.
The current stable version of Jasmine is 5.12.

Class: QueryString

QueryString(options)

Reads and manipulates the query string.

Constructor

new QueryString(options)

Parameters:
Name Type Description
options

Object with a getWindowLocation property, which should be a function returning the current value of window.location.

Since:
  • 2.0.0

Methods

fullStringWithNewParam(key, value) → {string}

Returns a new URL based on the current location, with the specified query parameter set.

Parameters:
Name Type Description
key string
value string
Returns:
Type
string

getParam(key) → {string}

Gets the value of the specified query parameter.

Parameters:
Name Type Description
key string
Returns:
Type
string

Sets the specified query parameter and navigates to the resulting URL.

Parameters:
Name Type Description
key string
value string