@std/media-types@0.215.0
latest
Works with
•JSR Score70%•It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun




Published2 years ago (0.215.0)
Functions
f
parseMediaType(v: string): [string, Record<string, string> | undefined]
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.