storage.getMany
The values under keys, as [key, value | null] entries in keys' order.
Utilização
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']);Assinaturas
(keys: string[]): Promise<StorageEntry[]>Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
keys | string[] | Sim | — |
Devolve
Promise<StorageEntry[]>
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.