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

std/media_types/parse_media_type.ts

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.224.0/media_types/parse_media_type.ts";

Functions

Parses the media type and any optional parameters, per RFC 1521. Media types are the values in Content-Type and Content-Disposition headers. On success the function returns a tuple where the first element is the media type and the second element is the optional parameters or undefined if there are none.