(entries: FormDataInput)
| 423 | * @since 4.0.0 |
| 424 | */ |
| 425 | export const formDataRecord = (entries: FormDataInput): FormData => { |
| 426 | const data = new globalThis.FormData() |
| 427 | for (const [key, value] of Object.entries(entries)) { |
| 428 | if (Array.isArray(value)) { |
| 429 | for (const item of value) { |
| 430 | appendFormDataValue(data, key, item) |
| 431 | } |
| 432 | } else { |
| 433 | appendFormDataValue(data, key, value as FormDataCoercible) |
| 434 | } |
| 435 | } |
| 436 | return formData(data) |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * HTTP body variant backed by a stream of `Uint8Array` chunks. |
nothing calls this directly
no test coverage detected