Class: Cookies

XOpatStorage.Cookies

Cookie Interface for storage of configuration / metadata. Cookies should be used only when Cache cannot be used, e.g. ensuring token security, or caching values only for certain amount of time. This storage is NOT persistent. This interface must be sync: if you use async server access, make sure to e.g. prefetch the data in given context. Note that this class _should_ behave like common cookies, e.g. have expiration, share data on common domain/path etc. The default implementation stores this data within browser cookies.

Constructor

new Cookies()

Source:

Extends

Methods

delete(key, key)

Parameters:
Name Type Description
key string
key
Inherited From:
Source:

get(key, defaultValue) → {*|undefined}

Parameters:
Name Type Description
key any
defaultValue any returned only in case undefined would be returned
Inherited From:
Source:
Returns:
value to store, or undefined in the default value is missing
Type
* | undefined

set(key, value)

Parameters:
Name Type Description
key string
value string
Inherited From:
Source: