QueryString

ol-ishare/store. QueryString

Store items in a QueryString

This can be used to create links that could, for example, then be used to load an application with a given state. Alternatively the links could be used to submit information to and/or request it from a web service.

Can optionally combine the querystring with a URL.

Constructor

new QueryString(optionsopt)

Parameters:
Name Type Attributes Description
options Object <optional>

Settings for working with the querystring

Properties
Name Type Attributes Default Description
interval Boolean <optional>
100

Minimum time in milliseconds between emitting events

baseUrl URL | String <optional>

A URL to which to append the querystring.

Extends

Members

baseUrl :URL|String

A URL with which to combine the querystring.

Type:

url :URL

The full URL created from .baseUrl and .params

Type:
  • URL

params :URLSearchParams

Current querystring parameters

Type:
  • URLSearchParams

Methods

(abstract) put(dict) → {Promise}

Overrides:

Put items in storage

Parameters:
Name Type Description
dict Object

Items to store, keys/property names must be strings. Values must be serializable to strings.

Returns:

Resolves to the keys of values that were successfully stored.

Type
Promise

(abstract) fetch(keys) → {Promise}

Overrides:

Fetch items from storage

Parameters:
Name Type Description
keys Array.<String>

Names of items to fetch from storage.

Returns:

Resolves to an object with properties for each valid key, and the stored item with that name as the value.

Type
Promise

(abstract) discard(keys) → {Promise}

Overrides:

Discard items in storage

Parameters:
Name Type Description
keys Array.<String>

Names of items to discard.

Returns:

Resolves to an array of names of items that were successfully deleted.

Type
Promise