storage.setMany
Writes every entry in one transaction: all of them land, or none.
Usage
Read and write several keys together
import { storage } from 'kuito';
await storage.setMany([
['sync.cursor', 'page-12'],
['sync.finishedAt', String(Date.now())],
]);
const entries = await storage.getMany(['sync.cursor', 'sync.finishedAt']);
console.log(entries); // [key, value | null] pairs
const keys = await storage.keys();
console.log(keys);
await storage.deleteMany(['sync.cursor', 'sync.finishedAt']);Signatures
(entries: [key: string, value: string][]): Promise<void>Parameters
| Name | Type | Required | Description |
|---|---|---|---|
entries | [key: string, 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.