A simple JSON-based local database for Deno
import { createDb } from "https://deno.land/x/[email protected]/mod.ts";
const myDb = createDb();
const myItem = {
id: "my_id",
val: "my_value",
};
myDb.createRecord(myItem);
id
property is required.
deno run --unstable --allow-read --allow-write my_program.ts
To-do
To-do
To-do
To-do
myDb.dropDb();
myDb.dropDb(true);
const myOptions = {
dbDir: "my/nested/dir",
pretty: 4, // saves db file in pretty format, number of spaces to indent
};
const customizedDb = createDb(myOptions);
deno test --unstable --allow-read --allow-write https://deno.land/x/[email protected]/test.ts
MIT