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

Commit b9916c5

Browse files
committed
@0.17.0-4, fix repair/destroy, remove copy
1 parent 5dae647 commit b9916c5

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

level-packager.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ function packager (leveldown) {
1212
return levelup(location, options, callback)
1313
}
1414

15-
'copy destroy repair'.split(' ').forEach(function (m) {
16-
Level[m] = levelup[m]
15+
[ 'destroy', 'repair' ].forEach(function (m) {
16+
if (typeof leveldown[m] == 'function') {
17+
console.log('we have a', m)
18+
Level[m] = function (location, callback) {
19+
leveldown[m](location, callback || function () {})
20+
}
21+
} else {
22+
console.error('leveldown has no method:', m)
23+
console.error(leveldown)
24+
}
1725
})
1826

1927
return Level

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name" : "level-packager"
33
, "description" : "LevelUP package helper for distributing with a LevelDOWN-compatible back-end"
4-
, "version" : "0.17.0-3"
4+
, "version" : "0.17.0-4"
55
, "contributors" : [
66
"Rod Vagg <r@va.gg> (https://github.com/rvagg)"
77
, "John Chesley <john@chesl.es> (https://github.com/chesles/)"

0 commit comments

Comments
 (0)