File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ Adapters for reading and writing text. Useful for creating custom adapters.
300300Adapters for easily supporting other data formats or adding behaviors (encrypt, compress...).
301301
302302``` js
303- import { DataFile } from ' lowdb'
303+ import { DataFile } from ' lowdb/node '
304304new DataFile (filename, {
305305 parse: YAML .parse ,
306306 stringify: YAML .stringify
@@ -344,6 +344,7 @@ class SyncAdapter {
344344For example, let's say you have some async storage and want to create an adapter for it:
345345
346346``` js
347+ import { Low } from ' lowdb'
347348import { api } from ' ./AsyncStorage'
348349
349350class CustomAsyncAdapter {
@@ -363,7 +364,7 @@ class CustomAsyncAdapter {
363364}
364365
365366const adapter = new CustomAsyncAdapter ()
366- const db = new Low (adapter)
367+ const db = new Low (adapter, {} )
367368```
368369
369370See [ ` src/adapters/ ` ] ( src/adapters ) for more examples.
@@ -399,7 +400,7 @@ class YAMLFile {
399400}
400401
401402const adapter = new YAMLFile (' file.yaml' )
402- const db = new Low (adapter)
403+ const db = new Low (adapter, {} )
403404```
404405
405406## Limits
You can’t perform that action at this time.
0 commit comments