Skip to content

Commit

Permalink
Expose nextTick for API parity with abstract-leveldown
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Oct 2, 2021
1 parent e2e2c34 commit 7bc86e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/levelup.js
Expand Up @@ -325,6 +325,9 @@ LevelUP.prototype.toString = function () {

LevelUP.prototype.type = 'levelup'

// Expose nextTick for API parity with abstract-leveldown
LevelUP.prototype._nextTick = nextTick

function maybeError (db, callback) {
if (!db.isOperational()) {
nextTick(callback, new ReadError('Database is not open'))
Expand Down

0 comments on commit 7bc86e4

Please sign in to comment.