level-hooks
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -19,3 +19,3 @@ | ||
post: function (posthook) { | ||
posthooks.push(posthook) | ||
db.on('hooks:post', posthook) | ||
return db | ||
@@ -33,5 +33,3 @@ }, | ||
function each (e) { | ||
posthooks.forEach(function (h) { | ||
h(e) | ||
}) | ||
db.emit('hooks:post', e) | ||
} | ||
@@ -75,3 +73,3 @@ | ||
db._db.del = function (key, opts, cb) { | ||
var batch =[{key: key, type: 'del'}] | ||
var batch = [{key: key, type: 'del'}] | ||
return callHooks(batch, opts, cb) | ||
@@ -78,0 +76,0 @@ } |
{ | ||
"name": "level-hooks", | ||
"description": "pre/post hooks for leveldb", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/dominictarr/level-hooks", | ||
@@ -6,0 +6,0 @@ "repository": { |
9447
226