Skip to content

Interface: StorageApi ​

A small key-value store private to the extension.

Properties ​

delete ​

readonly delete: (key) => Promise<void>

Removes a key. Needs storage:local.

Parameters ​

key ​

string

Returns ​

Promise<void>


get ​

readonly get: (key) => Promise<unknown>

The stored JSON value, or undefined. Needs storage:local.

Parameters ​

key ​

string

Returns ​

Promise<unknown>


set ​

readonly set: (key, value) => Promise<void>

Stores a JSON value; fails once the store would pass 1 MiB. Needs storage:local.

Parameters ​

key ​

string

value ​

unknown

Returns ​

Promise<void>

Released under the MIT License. Development supported by Ensita. YapYap is unofficial and not affiliated with WhatsApp or Meta.