storage.set
Stores the string value under key, replacing what was there.
Usage
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');Signatures
(key: string, value: string): Promise<void>Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | — |
value | string | Yes | — |
Returns
Promise<void>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.