UNPKG

lodb

Version:

Flat JSON file database, fork of lowdb

52 lines (37 loc) 850 B
# LoDB > Flat JSON file database, fork of [typicode/lowdb](https://github.com/typicode/lowdb) ## What's new in LoDB * Drop autosave * Attach stringify/parse onto each db ## What's in LowDB * Serverless * Multiple databases * In-memory or disk-based * 80+ methods from Lo-Dash API * Atomic writing * Extendable ## Usage ```javascript var lodb = require('lodb') var db = lodb('db.json') db('songs').push({ title: 'low!'}) db.save() ``` Database is automatically created and saved to `db.json` in a readable format. ```javascript { "songs": [ { "title": "low!" } ] } ``` Data can be queried and manipulated using any Lo-Dash method. ```javascript var song = db('songs').find({ title: 'low!' }).value() db('songs').remove({ title: 'low!' }) db.save() ``` ## License Both LoDB and LowDB are released under the MIT License.