Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Increase API parity with levelup #383

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7765471
Add `length` property to chained batch for API parity
vweevers Oct 2, 2021
d4531e4
Breaking: add promise support and throw if not operational
vweevers Oct 3, 2021
950bfe5
Breaking: remove `setUp` and `tearDown` from test suite
vweevers Oct 3, 2021
6260d12
Breaking: make `clear()` and `getMany()` mandatory
vweevers Oct 3, 2021
bc39001
Remove `promises` and `status` options from test suite
vweevers Oct 3, 2021
9f40183
Make `AbstractLevelDOWN` an `EventEmitter`
vweevers Oct 3, 2021
24dbb23
Make opening & closing idempotent and add events
vweevers Oct 3, 2021
7ddec3c
Breaking: set initial status to 'closed' instead of 'new'
vweevers Oct 8, 2021
833405d
fixup! Make opening & closing idempotent and add events
vweevers Oct 8, 2021
8df123b
Allow `iterator.end()` while `status` is closing
vweevers Oct 8, 2021
e6b9aac
Breaking: remove test suite options in favor of `db.supports`
vweevers Oct 8, 2021
90a1827
Breaking: end iterators on db close and make ending idempotent
vweevers Oct 8, 2021
d977023
Breaking: close chained batch on db close to prevent reuse
vweevers Oct 8, 2021
dbbf1d8
Normalize `limit` similar to `levelup`
vweevers Oct 9, 2021
cda2e60
Add `passive` option to `db.open()`
vweevers Oct 9, 2021
a0df5b8
Add `db.supports.events`
vweevers Oct 9, 2021
5e3630b
Add put, del, batch and clear events
vweevers Oct 9, 2021
b70b757
fixup! Normalize `limit` similar to `levelup`
vweevers Oct 9, 2021
e207096
Breaking: add deferred open
vweevers Oct 17, 2021
2d916ec
fixup! Breaking: add deferred open
vweevers Oct 18, 2021
c5e8678
Breaking: add encodings and support UInt8Array
vweevers Oct 26, 2021
413b828
Breaking: drop support of Node.js 10
vweevers Oct 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Normalize limit similar to levelup
  • Loading branch information
vweevers committed Oct 9, 2021
commit b70b7576eded07298eddb0c9f222aca04f6340b9
2 changes: 1 addition & 1 deletion abstract-leveldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ AbstractLevelDOWN.prototype.clear = function (options, callback) {

options = cleanRangeOptions(this, options)
options.reverse = !!options.reverse
options.limit = 'limit' in options ? options.limit : -1
options.limit = typeof options.limit === 'number' && options.limit !== Infinity ? options.limit : -1

this._clear(options, (err) => {
if (err) return callback(err)
Expand Down