scmJS docs

api.storage

StorageApi

A small key-value store of the plugin's own, kept in the browser's local storage under the plugin's id and listed with everything else in Preferences ▸ Browser storage.

Members

get

get<T>(key: string, fallback: T): T;

A small key-value store of the plugin's own, under its id in the browser's local storage and listed in Preferences \u25b8 Browser storage.

const opts = api.storage.get("options", { showGrid: true });
api.storage.set("options", { ...opts, showGrid: false });

set

set(key: string, value: unknown): void;

remove

remove(key: string): void;

scmJS 0.1.0 · Generated from the repository. StarCraft and Brood War are trademarks of Blizzard Entertainment; this project ships none of their data.