Skip to content

Commit

Permalink
Remove dependency xtend
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle authored and rvagg committed Mar 1, 2019
1 parent 6115577 commit 76e9306
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
"license": "MIT",
"dependencies": {
"readable-stream": "2 || 3",
"xtend": "~4.0.1"
"readable-stream": "2 || 3"
},
"devDependencies": {
"bl": "~2.0.1",
Expand Down
5 changes: 2 additions & 3 deletions through2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var Transform = require('readable-stream').Transform
, inherits = require('util').inherits
, xtend = require('xtend')

function DestroyableTransform(opts) {
Transform.call(this, opts)
Expand Down Expand Up @@ -68,7 +67,7 @@ module.exports.ctor = through2(function (options, transform, flush) {
if (!(this instanceof Through2))
return new Through2(override)

this.options = xtend(options, override)
this.options = Object.assign({}, options, override)

DestroyableTransform.call(this, this.options)
}
Expand All @@ -85,7 +84,7 @@ module.exports.ctor = through2(function (options, transform, flush) {


module.exports.obj = through2(function (options, transform, flush) {
var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
var t2 = new DestroyableTransform(Object.assign({ objectMode: true, highWaterMark: 16 }, options))

t2._transform = transform

Expand Down

0 comments on commit 76e9306

Please sign in to comment.