UNPKG

@scalar/oas-utils

Version:

Open API spec and Yaml handling utilities

21 lines (20 loc) 492 B
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