Set item to storage

Sets an item to persistent storage under the given key.

Sets an item to persistent storage under the given key, allowing it to be later fetched with Get item from storage.

Storage is persisted across app restarts.

You can store any kind of JSON-stringifiable data in the persistent storage.

Input arguments

Label

Key

Type

Required?

Default

Description

Item key

key

String

Yes

Key under which the item should be stored in persistent storage.

Data to store

data

Value

Yes

Data to store in persistent storage under the given key.

Output arguments

Number of outputs: 2

No output arguments.

Events

No events.

Errors

Label

Code

Description

JSON stringification failed

stringificationFailed

Thrown if the given Data to store could not be converted into a string.

Storage set failed

storageSetFailed

Thrown if the given data could not be set to persistent storage under the given key.