File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import isFile from "./util/isFile"
6
6
import { FormDataLike } from "./FormDataLike"
7
7
8
8
const DASHES = "-" . repeat ( 2 )
9
+
9
10
const CRLF = "\r\n"
10
11
const CRLF_BYTES = new TextEncoder ( ) . encode ( CRLF )
11
12
const CRLF_BYTES_LENGTH = CRLF_BYTES . byteLength
@@ -91,6 +92,9 @@ export class Encoder {
91
92
return length + this . #footer. byteLength
92
93
}
93
94
95
+ /**
96
+ * Creates an async iterator allowing to perform the encoding by portions.
97
+ */
94
98
async * encode ( ) : AsyncGenerator < Uint8Array , void , undefined > {
95
99
for ( const [ name , value ] of this . #form) {
96
100
yield this . _getFieldHeader ( name , value )
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ Creates a multipart/form-data encoder.
100
100
101
101
#### ` encode() -> {AsyncGenerator<Buffer, void, undefined>} `
102
102
103
- Creates an async iterator allowing to perform encoding process by portions.
103
+ Creates an async iterator allowing to perform the encoding by portions.
104
104
105
105
#### ` [Symbol.asyncIterator]() -> {AsyncGenerator<Buffer, void, undefined>} `
106
106
You can’t perform that action at this time.
0 commit comments