storage.set
Stores the string value under key, replacing what was there.
Verwendung
Save a sync cursor
import { storage } from 'kuito';
await storage.set('sync.cursor', 'page-12');
const cursor = await storage.get('sync.cursor'); // string | null
console.log(cursor ?? 'No previous sync');
await storage.delete('sync.cursor');Signaturen
(key: string, value: string): Promise<void>Parameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
key | string | Ja | — |
value | string | Ja | — |
Rückgabe
Promise<void>
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.