@scalar/oas-utils
Version:
Open API spec and Yaml handling utilities
21 lines (20 loc) • 492 B
JavaScript
import { normalizeMimeType } from "./normalize-mime-type.js";
function normalizeMimeTypeObject(content) {
if (!content) {
return content;
}
const newContent = {
...content
};
Object.entries(newContent).forEach(([key, value]) => {
const normalizedKey = normalizeMimeType(key);
if (normalizedKey) {
newContent[normalizedKey] = value;
}
});
return newContent;
}
export {
normalizeMimeTypeObject
};
//# sourceMappingURL=normalize-mime-type-object.js.map