storage.peek
The value under key, or null, read synchronously on the JS thread: for
small reads at startup. It sees every write whose promise resolved.
Usage
Read one small startup value synchronously.
// Read one small startup value synchronously.
import { storage } from 'kuito';
const lastAccount = storage.peek('account.last');
console.log(lastAccount ?? 'Choose an account');Signatures
(key: string): string | nullParameters
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | — |
Returns
string
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.