You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add new features
* chore: update Node version requirement to >=18
* chore: update dependencies in package.json
* feat: refactor code to use db.update() instead of directly modifying data
* fix: update JSON presets in CLI and server examples
* fix: node version typo
* fix: refactor file imports in TextFile and TextFileSync classes
constsortedPosts=posts.toSorted((a, b) =>a.views-b.views)
16
20
```
17
21
18
22
```js
19
23
// db.json
20
24
{
21
25
"posts": [
22
-
{ "id":1, "title":"lowdb is awesome" }
26
+
{ "id":1, "title":"lowdb is awesome", "views":100 }
23
27
]
24
28
}
25
29
```
@@ -50,6 +54,7 @@ db.write()
50
54
- Hackable:
51
55
- Change storage, file format (JSON, YAML, ...) or add encryption via [adapters](#adapters)
52
56
- Extend it with lodash, ramda, ... for super powers!
57
+
- Automatically switches to fast in-memory mode during tests
53
58
54
59
## Install
55
60
@@ -62,21 +67,18 @@ npm install lowdb
62
67
_Lowdb is a pure ESM package. If you're having trouble using it in your project, please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)._
0 commit comments