Skip to content

Commit 52ef611

Browse files
committed
style: removing some unused code
1 parent 146b8c3 commit 52ef611

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/helpers/form-data.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
const carriage = '\r\n'
2828
const dashes = '-'.repeat(2)
29-
const carriageLength = Buffer.byteLength(carriage)
3029

3130
const NAME = Symbol.toStringTag
3231

@@ -101,28 +100,4 @@ module.exports.formDataIterator = function * (form, boundary) {
101100
yield getFooter(boundary)
102101
}
103102

104-
/**
105-
* @param {FormData} form
106-
* @param {string} boundary
107-
*/
108-
module.exports.getFormDataLength = function (form, boundary) {
109-
let length = 0
110-
111-
for (const [name, value] of form) {
112-
length += Buffer.byteLength(getHeader(boundary, name, value))
113-
114-
if (isBlob(value)) {
115-
length += value.size
116-
} else {
117-
length += Buffer.byteLength(String(value))
118-
}
119-
120-
length += carriageLength
121-
}
122-
123-
length += Buffer.byteLength(getFooter(boundary))
124-
125-
return length
126-
}
127-
128103
module.exports.isBlob = isBlob

0 commit comments

Comments
 (0)