Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 518 Bytes

README.md

File metadata and controls

23 lines (14 loc) · 518 Bytes

memory

Implementation of Store interface that stores data in memory using Map.

Example

import MemoryStore from "@accumulators/memory";

const store = new MemoryStore();

const valuesToSet = new Map<string, string>();
valuesToSet.set("key1", "value1");
valuesToSet.set("key2", "value2");

await store.setMany(valuesToSet);

await store.set("key3", "value3");

const values = await store.getMany(["key2", "key3"]);

console.log(values.get("key2")); // "value2"