v6.0.0
What's Changed
- Drop Node 14 support
- Require
defaultData
parameter forLow
andLowSync
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!