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

Commit

Permalink
@0.17.0-4, fix repair/destroy, remove copy
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Oct 12, 2013
1 parent 5dae647 commit b9916c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions level-packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ function packager (leveldown) {
return levelup(location, options, callback)
}

'copy destroy repair'.split(' ').forEach(function (m) {
Level[m] = levelup[m]
[ 'destroy', 'repair' ].forEach(function (m) {
if (typeof leveldown[m] == 'function') {
console.log('we have a', m)
Level[m] = function (location, callback) {
leveldown[m](location, callback || function () {})
}
} else {
console.error('leveldown has no method:', m)
console.error(leveldown)
}
})

return Level
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "level-packager"
, "description" : "LevelUP package helper for distributing with a LevelDOWN-compatible back-end"
, "version" : "0.17.0-3"
, "version" : "0.17.0-4"
, "contributors" : [
"Rod Vagg <r@va.gg> (https://github.com/rvagg)"
, "John Chesley <john@chesl.es> (https://github.com/chesles/)"
Expand Down

0 comments on commit b9916c5

Please sign in to comment.