Skip to content

v6.0.0

Compare
Choose a tag to compare
@typicode typicode released this 19 Apr 01:06
· 25 commits to main since this release

What's Changed

  • Drop Node 14 support
  • Require defaultData parameter for Low and LowSync constructors to improve TypeScript experience
  • Move examples from Markdown to real TypeScript files

How to upgrade:

// v5
const defaultData = { posts: [] }
const db = new Low(adapter)
db.data ||= defaultData

function add() {
  db.data.posts.push('title') // TS error
}
// v6
const defaultData = { posts: [] }
const db = new Low(adapter, defaultData)

function add() {
  db.data.posts.push('title') // No TS error
}

If you like lowdb, please sponsor my work. If you cannot, a star or tweet is always appreciated.
Thank you!