x/mime_types@1.0.0

TypeScript portage of mime-types (on npm) for Deno.
Latest
import * as mimeTypes from "https://deno.land/x/mime_types@1.0.0/mod.ts";

Functions

charset

Get the default charset for a MIME type.

contentType

Create a full Content-Type header given a MIME type or extension.

extension

Get the default extension for a MIME type.

lookup

Lookup the MIME type for a file path/extension.

mime_types

TypeScript portage of mime-types for Deno.

The same API but with ES module and detailed types.

Load mime-db with fetch. You can change the JSON source by modifying the constant MIME_DB_URL (the default is JSDeliver).