level-hooks
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -164,3 +164,3 @@ var ranges = require('string-range') | ||
} | ||
h.hook.call(context, e, context.add) | ||
h.hook.call(context, e, context.add, b) | ||
} | ||
@@ -167,0 +167,0 @@ }) |
{ | ||
"name": "level-hooks", | ||
"description": "pre/post hooks for leveldb", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"homepage": "https://github.com/dominictarr/level-hooks", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -20,5 +20,7 @@ var rimraf = require('rimraf') | ||
db.hooks.pre(/^\w/, mac(function (ch, add, batch) { | ||
//iterate backwards so you can push without breaking stuff. | ||
db.hooks.pre(/^\w/, mac(function (ch, add) { | ||
//iterate backwards so you can push without breaking stuff. | ||
assert.ok(Array.isArray(batch)) | ||
assert.notEqual(batch.indexOf(ch), -1) | ||
var key = ch.key | ||
@@ -25,0 +27,0 @@ add({ |
18653
470