npm.io
0.1.3 • Published 8 years ago

lowdb-adapter

Licence
MIT
Version
0.1.3
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
3

lowdb-adapter NPM version

Makes it easy to connect lowdb in one string

Install

# Just use it
npm install lowdb-adapter --save

API

(fileName = 'db.json', adapterName = 'FileSync', options = {})
let db = require('lowdb-adapter')();
db.get('posts').push({id: 2).write();
filename

Default 'db.json'.

adapterName

Default 'FileSync'. Can be:

  1. FileSync
  2. FileAsync
  3. Memory
options

Default {encrypt : true, pass: 42} Used crypto

License

MIT

Keywords