Skip to content

@typicode typicode released this Aug 31, 2017 · 66 commits to master since this release

First stable release 🎉 😄

Thanks to all the people who have contributed to lowdb!

If you've already updated Lowdb to v0.17, you have nothing to change.

Assets 2

@typicode typicode released this Aug 23, 2017 · 71 commits to master since this release

  • Fix FileAsync adapter #209
Assets 2
Aug 20, 2017
0.17.1

@typicode typicode released this Aug 20, 2017 · 79 commits to master since this release

Breaking changes

low() function has been updated to be more explicit and fully storage agnostic. It now expects an adapter to be passed.

Also, when using async file storage, low() will now return a Promise, making it truely asyncrhonous, rather than the database instance.

tl;dr

See Examples page for updated code samples.

Migration guide

// 0.16
const db = low('db.json')

// 0.17
const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')

const adapter = new FileSync('db.json')
const db = low(adapter)

The rest of lowdb API is unchanged, database instance creation is the only part of your code that needs to be updated.

Adapters

Lowdb comes bundled with 4 adapters:

  • lowdb/adapters/FileSync
  • lowdb/adapters/FileAsync
  • lowdb/adapters/LocalStorage
  • lowdb/adapters/Memory

Special thanks to @yeskunall for the help!

Assets 2
Apr 9, 2017
Apr 9, 2017

@typicode typicode released this Mar 9, 2017 · 100 commits to master since this release

In this release, json-parse-helpfulerror is not included by default anymore due to issues with WebPack #153.

That said, you can still configure lowdb to use it:

const low = require('lowdb')
const jph = require('json-parse-helpfulerror');

const db = low('db.json', {
  format: {
    stringify: JSON.stringify,
    parse: jph.parse
  }
})
Assets 2
Feb 15, 2017
0.15.5
Feb 8, 2017
Feb 8, 2017
You can’t perform that action at this time.