super-bionic
v1.1.3
Published
An in-memory cache that saves to JSON and can be used as a database
Downloads
463
Maintainers
Readme
Bionic
Get Started
Usage
const db = new Bionic('data');
// see tmp/data.json for db
db.create('tableName', { name: 'first row of data' });
db.create('tableName', { name: 'second row of data' });
db.find('tableName', { name: 'first row of data' });
// > [{ name: 'first row of data', id: 1 }]
db.find('tableName', {});
// > [{ name: 'first row of data', id: 1 }, { name: 'second row of data', id: 2 }]
db.update('tableName', { id: 2 }, { description: 'this was updated' });
db.remove('tableName', { id: 1 });
// > [{ name: 'second row of data', description: 'this was updated', id: 2 }]