Add a value to a key
The key to add the value to
The value to add
Optional
The options to use
A promise if the driver is async, otherwise a number
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.add('key', 1); Copy
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.add('key', 1);
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.add('key', 1); Copy
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.add('key', 1);
Add a value to a key