lodb

0.5.2 • Public • Published

LoDB

Flat JSON file database, fork of 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

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.

{
  "songs": [
    {
      "title": "low!"
    }
  ]
}

Data can be queried and manipulated using any Lo-Dash method.

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.

Package Sidebar

Install

npm i lodb

Weekly Downloads

0

Version

0.5.2

License

MIT

Last publish

Collaborators

  • fritx