Subtract a value from a key
The key to subtract the value from
The value to subtract
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.subtract('key', 1); Copy
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.subtract('key', 1);
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.subtract('key', 1); Copy
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.subtract('key', 1);
Subtract a value from a key