Interface

interfaces/Storage

interfaces/Storage

The Storage interface. Implement this interfaces to indicate the method to store the data e.g.like cookies, localStorage.

Methods

# abstract static clear()

Clears all entries from the storage.

# abstract static get(key) → {mixed}

Gets a value from the storage for the specified key.

Parameters:
Name Type Description
key String

the key to store the value to

the retrieved value.Return false if key doesn't exist in storage.

mixed

# abstract static set(key, value)

Sets a value into the storage for the specified key.

Parameters:
Name Type Description
key String

the key to store the value to

value mixed

the value to store

# abstract static unset(key)

Clears a entry from the storage for the specified key.

Parameters:
Name Type Description
key String

the key to store the value to