Skip to content

Commit

Permalink
Remove mapWritable
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed May 31, 2024
1 parent c807332 commit 11bca13
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/outgoing-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const errors = require('./errors')

module.exports = class HTTPOutgoingMessage extends Writable {
constructor (socket) {
super({ mapWritable })
super()

this.socket = socket
this.headers = {}
Expand Down Expand Up @@ -42,7 +42,3 @@ module.exports = class HTTPOutgoingMessage extends Writable {
if (this.upgrade === false) this.socket.destroy()
}
}

function mapWritable (data) {
return typeof data === 'string' ? Buffer.from(data) : data
}

0 comments on commit 11bca13

Please sign in to comment.