@eggsnham07/simple-db
v0.1.3
Published
First you must create the database ```javascript const Database = require("@eggsnham07/simple-db"); const db = new Database(<dbName>); ``` `Database` has 2 parameters, both are optional: - dbName: `string` - opts: - - disableSafeShutdown: `boolean` - - di
Readme
How to use:
First you must create the database
const Database = require("@eggsnham07/simple-db");
const db = new Database(<dbName>);Database has 2 parameters, both are optional:
- dbName:
string - opts:
- disableSafeShutdown:
boolean
- disableSafeShutdown:
- disableDbRestore:
boolean
- disableDbRestore:
Setting database items
db.set(key: string, value: any) -> voidExample:
db.set("user_count", 135);Getting database items
db.get(key: string) -> anyExample
console.log(db.get("user_count"));Output:
135
