Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/media_types/mod.ts

Deprecated. Use std/media_types instead.
Extremely Popular
Latest
import * as mediaTypes from "https://deno.land/x/media_types@deprecated/mod.ts";

Variables

v
extensions
deprecated

A map of extensions for a given media type.

v
types
deprecated

A map of the media type for a given extension

Functions

f
charset
deprecated

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

f
contentType
deprecated

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

f
extension
deprecated

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

f
lookup
deprecated

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