Skip to content

Commit

Permalink
update levelup & leveldown
Browse files Browse the repository at this point in the history
  • Loading branch information
t3rr0r committed Feb 28, 2018
1 parent fad0098 commit 9545fe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"datastore-core": "~0.4.0",
"interface-datastore": "~0.4.1",
"level-js": "^2.2.4",
"leveldown": "^1.9.0",
"levelup": "^1.3.9",
"leveldown": "github:krahimian/leveldown",
"levelup": "^2.0.2",
"pull-stream": "^3.6.1"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

const pull = require('pull-stream')
const levelup = require('levelup')
const leveldown = require('leveldown')

const asyncFilter = require('interface-datastore').utils.asyncFilter
const asyncSort = require('interface-datastore').utils.asyncSort
Expand All @@ -24,7 +25,7 @@ class LevelDatastore {
/* :: db: levelup */

constructor (path /* : string */, opts /* : ?LevelOptions */) {
this.db = levelup(path, Object.assign({}, opts, {
this.db = levelup(opts.db ? opts.db(path) : leveldown(path), Object.assign({}, opts, {
compression: false, // same default as go
valueEncoding: 'binary'
}))
Expand Down

0 comments on commit 9545fe5

Please sign in to comment.