9 lines
349 B
JavaScript
9 lines
349 B
JavaScript
const getTransformedHeaders = (headers) => {
|
|
const transformedHeaders = {};
|
|
for (const name of Object.keys(headers)) {
|
|
const headerValues = headers[name];
|
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
}
|
|
return transformedHeaders;
|
|
};
|
|
export { getTransformedHeaders };
|