Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit c3f50ec

Browse files
committed
fix: Object.assign is now evil and no longer is behaving as spec says when Webpacked
1 parent 8330592 commit c3f50ec

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"interface-datastore": "^0.2.1",
4242
"level-js": "^2.2.4",
4343
"leveldown": "^1.7.0",
44-
"levelup": "^1.3.6",
44+
"levelup": "^1.3.7",
4545
"pull-stream": "^3.6.0"
4646
},
4747
"devDependencies": {

src/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ class LevelDatastore {
2424
/* :: db: levelup */
2525

2626
constructor (path /* : string */, opts /* : ?LevelOptions */) {
27-
this.db = levelup(path, Object.assign({}, {
28-
compression: false // same default as go
29-
}, opts, {
27+
this.db = levelup(path, Object.assign(opts, {
28+
compression: false, // same default as go
3029
valueEncoding: 'binary'
3130
}))
3231
}

0 commit comments

Comments
 (0)