Skip to content

Commit

Permalink
fix: remove unpipe package and use native unpipe method
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillip9587 committed Oct 16, 2024
1 parent 966bc9d commit 6b9c4b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var destroy = require('destroy')
var getBody = require('raw-body')
var iconv = require('iconv-lite')
var onFinished = require('on-finished')
var unpipe = require('unpipe')
var zlib = require('zlib')

/**
Expand Down Expand Up @@ -96,7 +95,7 @@ function read (req, res, next, parse, debug, options) {

// unpipe from stream and destroy
if (stream !== req) {
unpipe(req)
req.unpipe()
destroy(stream, true)
}

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 @@
"on-finished": "2.4.1",
"qs": "6.13.0",
"raw-body": "^3.0.0",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
"type-is": "~1.6.18"
},
"devDependencies": {
"eslint": "8.34.0",
Expand Down

0 comments on commit 6b9c4b4

Please sign in to comment.