.save()
Writes the cached data into the JSON file (database).
save()
db.toJSON(); // { counter: 17 }
db.add('counter', 3); // 17
db.get('counter'); // 17
db.save();
db.get('counter'); // 20
Last updated
Was this helpful?
Writes the cached data into the JSON file (database).
db.toJSON(); // { counter: 17 }
db.add('counter', 3); // 17
db.get('counter'); // 17
db.save();
db.get('counter'); // 20
Last updated
Was this helpful?