Skip to main content

energydb

key: string value: anydatabase

CDN

You can use denopkg or deno.land/x

Usage

import EnergyDB from "https://denopkg.com/shadowtime2000/energydb/mod.ts";

const db = new EnergyDB();

await db.set("foo", "bar");
await db.get("foo"); // "bar"
await db.delete("foo");

Custom Stores

Stores must fit the interface under mod/store.ts and store factories must fit the interface under mod/storeFactory.ts.

const storeFactory = () => new Map<string, any>(); // Replace with your own store

const db = new EnergyDB(storeFactory);