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

Commit cfce6bb

Browse files
committed
Breaking: remove Batch._levelup property
In favor of Batch.db which matches the property on abstract-leveldown's chained batch interface. Unlikely to cause breakage because _levelup was a private and undocumented property.
1 parent 4b35716 commit cfce6bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/batch.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ const getCallback = require('./common').getCallback
66
const getOptions = require('./common').getOptions
77

88
function Batch (levelup) {
9-
// TODO (next major): remove this._levelup alias
10-
this.db = this._levelup = levelup
9+
this.db = levelup
1110
this.batch = levelup.db.batch()
1211
this.ops = []
1312
this.length = 0
@@ -53,7 +52,7 @@ Batch.prototype.clear = function () {
5352
}
5453

5554
Batch.prototype.write = function (options, callback) {
56-
const levelup = this._levelup
55+
const levelup = this.db
5756
const ops = this.ops
5857

5958
callback = getCallback(options, callback)

0 commit comments

Comments
 (0)