The key to find in the collection
The callback find function to use
Optionaloptions: methodOptionsThe options to use
A promise if the driver is async, otherwise a value
const db = new GoodDB(new JSONDriver({
path: './database.json'
}));
db.find('key', (value) => value === 'value');
const db = new GoodDB(new MongoDBDriver({
uri: "..."
}));
await db.connect();
await db.find('key', (value) => value === 'value');
Find a key in a collection