Module

std/media_types/mod.ts>extension

Deno standard library
Go to Latest
function extension
import { extension } from "https://dotland.deno.dev/std@0.36.0/media_types/mod.ts";

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

Parameters

type: string

Returns

string | undefined