Storage
Persistent storage.
Permission
{
//...
"plugin": {
"permissions": {
"scopes": ["storage"]
}
}
}Usage
API
$storage.set("foo.bar", 1)
$storage.set("foo.baz", "2")
$storage.has("foo") // true
$storage.get<number>("foo.bar") // 1
$storage.get<Record<string, any>>("foo") // { "bar": 1, "baz": "2" }
$storage.set("foo", "bar")
$storage.get("foo") // bar
$storage.watch("foo", (value) => {})Example
Good to know
Last updated