storage.get
The value under key, or null.
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): Promise<string | null>Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | — |
Returns
Promise<string>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.