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
{{ message }}
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+48-38Lines changed: 48 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
## [7.0.0] - 2021-04-09
4
4
5
+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
6
+
5
7
### Changed
6
8
7
9
-**Breaking:** drop node 6 and 8 ([Level/community#98](https://github.com/Level/community/issues/98)) ([`5c6752f`](https://github.com/Level/encoding-down/commit/5c6752f)) (Vincent Weevers)
@@ -70,6 +72,8 @@
70
72
71
73
## [6.0.0] - 2018-12-25
72
74
75
+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
76
+
73
77
### Changed
74
78
75
79
- Prefer `const` over `var` in README ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -120,6 +124,8 @@
120
124
121
125
## [5.0.0] - 2018-05-13
122
126
127
+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
128
+
123
129
### Added
124
130
125
131
- Add 10 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -141,6 +147,8 @@
141
147
142
148
## [4.0.0] - 2018-02-12
143
149
150
+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
151
+
144
152
### Added
145
153
146
154
- Add 9 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -166,6 +174,8 @@
166
174
167
175
## [3.0.0] - 2017-11-11
168
176
177
+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
db.put(Buffer.from([0, 255]), 'example', function (err) {
97
96
db.get('00ff', { keyEncoding:'hex' }, function (err, value) {
@@ -105,8 +104,8 @@ db.put(Buffer.from([0, 255]), 'example', function (err) {
105
104
The [`level`][level] module conveniently bundles `encoding-down` and passes its `options` to `encoding-down`. This means you can simply do:
106
105
107
106
```js
108
-
var level =require('level')
109
-
var db =level('./db7', { valueEncoding:'json' })
107
+
constlevel=require('level')
108
+
constdb=level('./db7', { valueEncoding:'json' })
110
109
111
110
db.put('example', 42, function (err) {
112
111
db.get('example', function (err, value) {
@@ -132,11 +131,11 @@ Both encodings default to `'utf8'`. They can be a string (builtin `level-codec`
132
131
Please refer to [`level-codec` documentation][encoding-format] for a precise description of the format. Here's a quick example with `level` and `async/await` just for fun:
133
132
134
133
```js
135
-
var level =require('level')
136
-
var lexint =require('lexicographic-integer')
134
+
constlevel=require('level')
135
+
constlexint=require('lexicographic-integer')
137
136
138
137
asyncfunctionmain () {
139
-
var db =level('./db8', {
138
+
constdb=level('./db8', {
140
139
keyEncoding: {
141
140
type:'lexicographic-integer',
142
141
encode: (n) =>lexint.pack(n, 'hex'),
@@ -158,10 +157,10 @@ main()
158
157
With an npm-installed encoding (modularity ftw!) we can reduce the above to:
159
158
160
159
```js
161
-
var level =require('level')
162
-
var lexint =require('lexicographic-integer-encoding')('hex')
@@ -176,19 +175,11 @@ See the [Contribution Guide](https://github.com/Level/community/blob/master/CONT
176
175
177
176
## Donate
178
177
179
-
To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level) and [npm](https://www.npmjs.com/) packages. 💖
0 commit comments