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"
66import { FormDataLike } from "./FormDataLike"
77
88const DASHES = "-" . repeat ( 2 )
9+
910const CRLF = "\r\n"
1011const CRLF_BYTES = new TextEncoder ( ) . encode ( CRLF )
1112const CRLF_BYTES_LENGTH = CRLF_BYTES . byteLength
@@ -91,6 +92,9 @@ export class Encoder {
9192 return length + this . #footer. byteLength
9293 }
9394
95+ /**
96+ * Creates an async iterator allowing to perform the encoding by portions.
97+ */
9498 async * encode ( ) : AsyncGenerator < Uint8Array , void , undefined > {
9599 for ( const [ name , value ] of this . #form) {
96100 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.
100100
101101#### ` encode() -> {AsyncGenerator<Buffer, void, undefined>} `
102102
103- Creates an async iterator allowing to perform encoding process by portions.
103+ Creates an async iterator allowing to perform the encoding by portions.
104104
105105#### ` [Symbol.asyncIterator]() -> {AsyncGenerator<Buffer, void, undefined>} `
106106
You can’t perform that action at this time.
0 commit comments