Try Install Learn Blog API Packages GitHub
Pages

Storage.Common

Common implementation of the storage api.

Functions

clear
(
storage
:
Storage
)
:
Result(Storage.Error, Void)

Clears the given storage.

get
(
storage
:
Storage
key
:
String
)
:
Result(Storage.Error, String)

Gets the value of given key in the given storage.

keys
(
storage
:
Storage
)
:
Result(Storage.Error, Array(String))

Returns the keys in the given storage.

remove
(
storage
:
Storage
key
:
String
)
:
Result(Storage.Error, Void)

Removes the value with the given key from the given storage.

set
(
storage
:
Storage
key
:
String
value
:
String
)
:
Result(Storage.Error, Void)

Sets the given key to the given value in the given storage.

size
(
storage
:
Storage
)
:
Result(Storage.Error, Number)

Returns the number of items in the storage.