Skip to content

Commit

Permalink
Replace xtend with Object.assign (Level/community#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Apr 25, 2021
1 parent 37d5e61 commit 3fc0829
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions level-ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const Writable = require('readable-stream').Writable
const inherits = require('inherits')
const extend = require('xtend')

const defaultOptions = { type: 'put' }

Expand All @@ -11,7 +10,7 @@ function WriteStream (db, options) {
return new WriteStream(db, options)
}

options = extend(defaultOptions, options)
options = Object.assign({}, defaultOptions, options)

Writable.call(this, {
objectMode: true,
Expand Down Expand Up @@ -45,7 +44,7 @@ WriteStream.prototype._write = function (data, enc, next) {
this._write(data, enc, next)
})
} else {
this._buffer.push(extend({ type: this._options.type }, data))
this._buffer.push(Object.assign({ type: this._options.type }, data))
next()
}
}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
],
"dependencies": {
"inherits": "^2.0.3",
"readable-stream": "^3.1.0",
"xtend": "^4.0.1"
"readable-stream": "^3.1.0"
},
"devDependencies": {
"dependency-check": "^3.3.0",
Expand Down

0 comments on commit 3fc0829

Please sign in to comment.