Skip to main content
Module

x/media_types/mod.ts>contentType

A module that assists in resolving media types and extensions.
Extremely Popular
Go to Latest
function contentType
Deprecated
Deprecated

use Deno std/media_types instead

import { contentType } from "https://deno.land/x/media_types@v2.13.0/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