Module

std/media_types/mod.ts

Deno standard library
Go to Latest
import * as mod from "https://dotland.deno.dev/std@0.36.0/media_types/mod.ts";

Variables

A map of extensions for a given media type

A map of the media type for a given extension

Functions

Given a media type return any default charset string. Returns undefined if not resolvable.

Given an extension or media type, return the full Content-Type header string. Returns undefined if not resolvable.

Given a media type, return the most appropriate extension or return undefined if there is none.

Given an extension, lookup the appropriate media type for that extension. Likely you should be using contentType() though instead.