Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode authored Oct 23, 2023
1 parent 8841e1c commit 5769a84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ db.data.messages.push(1) // ❌ TypeScript error

### Lodash

You can extend lowdb with Lodash (or other libraries).
You can extend lowdb with Lodash (or other libraries). To be able to extend it, we're not using `JSONPreset` here. Instead, we're using lower components.

```ts
import { Low } from 'lowdb'
Expand All @@ -130,6 +130,7 @@ const defaultData: Data = {
posts: [],
}
const adapter = new JSONFile<Data>('db.json', defaultData)

const db = new LowWithLodash(adapter)
await db.read()

Expand Down

0 comments on commit 5769a84

Please sign in to comment.