mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
8 lines
213 B
TypeScript
8 lines
213 B
TypeScript
export function headersToRecord(headers: Headers): Record<string, string> {
|
|
const result: Record<string, string> = {};
|
|
for (const [key, value] of headers.entries()) {
|
|
result[key] = value;
|
|
}
|
|
return result;
|
|
}
|