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
Copy file name to clipboardExpand all lines: UPGRADING.md
+3-30Lines changed: 3 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,42 +4,15 @@ This document describes breaking changes and how to upgrade. For a complete list
4
4
5
5
## 10.0.0
6
6
7
-
This release upgrades to `abstract-level` 3. Please see its [upgrade guide](https://github.com/Level/abstract-level/blob/v3.0.0/UPGRADING.md) for details. On this end we'll only summarize its new features, because they're not supported in all environments.
7
+
This release upgrades to `abstract-level` 3. Please see its [upgrade guide](https://github.com/Level/abstract-level/blob/v3.0.0/UPGRADING.md).
8
8
9
-
In Node.js (but not browsers) you can now create "explicit snapshots" to read previous versions of a database:
In Node.js with TypeScript (5.2) that last `close()` call can be skipped because we added support of [`Symbol.asyncDispose`](https://github.com/tc39/proposal-explicit-resource-management) on databases, iterators and snapshots:
In Node.js and browsers you can use newly-added `has()` and `hasMany()` methods to check if keys exist without the cost of fetching values:
29
-
30
-
```js
31
-
if (awaitdb.has('fruit')) {
32
-
console.log('We have fruit')
33
-
}
34
-
```
35
-
36
-
In Node.js you can (in certain cases) improve application performance using a new `getSync()` method that blocks the event loop but can be significantly faster than the asynchronous `db.get()` method:
9
+
Not mentioned in that guide is the later addition of `db.getSync()`. This new method blocks the event loop but can be significantly faster than `db.get()`:
37
10
38
11
```js
39
12
constvalue=db.getSync('example')
40
13
```
41
14
42
-
Lastly, `has()`, `hasMany()` and `getSync()` also support explicit snapshots. Bon appétit!
15
+
It is only supported in Node.js (via `classic-level`) and not in browsers.
0 commit comments