File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed 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.
300
300
Adapters for easily supporting other data formats or adding behaviors (encrypt, compress...).
301
301
302
302
``` js
303
- import { DataFile } from ' lowdb'
303
+ import { DataFile } from ' lowdb/node '
304
304
new DataFile (filename, {
305
305
parse: YAML .parse ,
306
306
stringify: YAML .stringify
@@ -344,6 +344,7 @@ class SyncAdapter {
344
344
For example, let's say you have some async storage and want to create an adapter for it:
345
345
346
346
``` js
347
+ import { Low } from ' lowdb'
347
348
import { api } from ' ./AsyncStorage'
348
349
349
350
class CustomAsyncAdapter {
@@ -363,7 +364,7 @@ class CustomAsyncAdapter {
363
364
}
364
365
365
366
const adapter = new CustomAsyncAdapter ()
366
- const db = new Low (adapter)
367
+ const db = new Low (adapter, {} )
367
368
```
368
369
369
370
See [ ` src/adapters/ ` ] ( src/adapters ) for more examples.
@@ -399,7 +400,7 @@ class YAMLFile {
399
400
}
400
401
401
402
const adapter = new YAMLFile (' file.yaml' )
402
- const db = new Low (adapter)
403
+ const db = new Low (adapter, {} )
403
404
```
404
405
405
406
## Limits
You can’t perform that action at this time.
0 commit comments