@accumulators/memory
TypeScript icon, indicating that this package has built-in type declarations

4.2.3 • Public • Published

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"

Readme

Keywords

none

Package Sidebar

Install

npm i @accumulators/memory

Weekly Downloads

2

Version

4.2.3

License

GPL-3.0-or-later

Unpacked Size

3.76 kB

Total Files

5

Last publish

Collaborators

  • 0xmarcello
  • beeinger