Skip to main content
Module

x/mimetypes/mod.ts>Mime

Deno Mime types module
Latest
class Mime
import { Mime } from "https://deno.land/x/mimetypes@v1.0.0/mod.ts";

Constructors

new
Mime(...typeMaps: Array<MimeTypeMap>)

Properties

readonly
extensions: Map<string, string>
readonly
types: Map<string, string>

Methods

define(typeMap: MimeTypeMap, force?: boolean)
getExtension(type: string): string | undefined

Return file extension associated with a mime type

getType(path: string): string | undefined

Lookup a mime type based on extension