pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/

mr feedback

Jorrin b5cd297a ad8c6709

+2 -7
+2 -7
src/backend/extension/request.ts
··· 6 6 if (typeof body === "string") return "string"; 7 7 if (body instanceof FormData) return "FormData"; 8 8 if (body instanceof URLSearchParams) return "URLSearchParams"; 9 - if (typeof body === "object") return "object"; 10 - return undefined; 9 + return "object"; 11 10 } 12 11 13 12 export function convertBodyToObject(body: unknown): any { 14 13 if (body instanceof FormData || body instanceof URLSearchParams) { 15 - const obj: Record<string, any> = {}; 16 - for (const [key, value] of body.entries()) { 17 - obj[key] = value; 18 - } 19 - return obj; 14 + return [...body]; 20 15 } 21 16 return body; 22 17 }