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

x/ayonli_jsext/esm/filetype.js>getUTI

A JavaScript extension package for building strong and modern applications.
Latest
function getUTI
import { getUTI } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/filetype.js";

Returns the corresponding UTI (Uniform Type Identifier) for the given type, where the type is a file extension or a MIME type name.

Examples

Example 1

import { getUTI } from "@ayonli/jsext/filetype";

console.log(getUTI(".png")); // public.png
console.log(getUTI("image/png")); // public.png