From 15ea85883c19cc2a6588d97b3e69ad8627a2dcf6 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sat, 9 Oct 2021 13:05:13 +0200 Subject: [PATCH] Add `db.supports.events` --- lib/levelup.js | 19 ++++++++++++++++++- package.json | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/levelup.js b/lib/levelup.js index 417cfcc6..f09b4e94 100644 --- a/lib/levelup.js +++ b/lib/levelup.js @@ -64,7 +64,24 @@ function LevelUP (db, options, callback) { deferredOpen: true, openCallback: true, promises: true, - streams: true + streams: true, + events: { + opening: true, + open: true, + ready: true, + closing: true, + closed: true, + put: true, + del: true, + batch: true, + clear: true, + error: true + }, + + // Unsupported abstract-leveldown features + idempotentOpen: false, + passiveOpen: false, + serialize: false }) // Experimental: enrich levelup interface diff --git a/package.json b/package.json index b8ce5f12..335b1712 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "deferred-leveldown": "^7.0.0", "level-errors": "^3.0.1", "level-iterator-stream": "^5.0.0", - "level-supports": "^2.0.1", + "level-supports": "^2.0.2", "queue-microtask": "^1.2.3" }, "devDependencies": {