1.0.2 • Published 3 years ago
extra-storage v1.0.2
Extra Storage
A simple JSON database manager
Example
import { Database } from 'extra-storage';
async function main() {
const database = await new Database('db.json').load();
await database.set('wyxo', 5);
console.log(await database.get('wyxo')); // 5
await database.math('wyxo', '^', 2);
console.log(await database.get('wyxo')); // 25
await database.remove('wyxo');
console.log(await database.get('wyxo')); // undefined
}
main();