Module

x/media_types/mod.ts>contentType

A module that assists in resolving media types and extensions.
Extremely Popular
Go to Latest
function contentType
import { contentType } from "https://dotland.deno.dev/x/media_types@v3.0.3/mod.ts";

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

Parameters

str: string

Returns

string | undefined