UNPKG

zents

Version:

ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.

18 lines 570 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getContentType = void 0; const mime_types_1 = require("mime-types"); const cache = new Map(); const getContentType = function (filenameOrExt) { if (cache.has(filenameOrExt)) { return cache.get(filenameOrExt); } const mimeType = mime_types_1.contentType(filenameOrExt); if (!mimeType) { return false; } cache.set(filenameOrExt, mimeType); return mimeType; }; exports.getContentType = getContentType; //# sourceMappingURL=getContentType.js.map