Try Install Learn Blog API Packages GitHub
Pages
core

Search
Entities

Storage.Local

Functions

clear
:
Result(Storage.Error, Void)

Clears the local storage.

Storage.Local.clear()
delete
(
key
:
String
)
:
Result(Storage.Error, Void)

Delete the value with the given key.

Storage.Local.delete("key")
get
(
key
:
String
)
:
Result(Storage.Error, String)

Gets the value of given key.

Storage.Local.get("key")
keys
:
Result(Storage.Error, Array(String))

Returns the keys in the local storage.

Storage.Local.keys() == []
set
(
key
:
String
value
:
String
)
:
Result(Storage.Error, Void)

Sets the given key to the given value.

Storage.Local.set("key", "value")
size
:
Result(Storage.Error, Number)

Returns the number of items in the local storage.

Storage.Local.size() == 0