Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/oak/mediaTyper.ts>parse

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
function parse
import { parse } from "https://deno.land/x/oak@v12.1.0/mediaTyper.ts";

Given a media type string, return a media type object.

  parse("application/json-patch+json");
  // returns {
  //   type: "application",
  //   subtype: "json-patch",
  //   suffix: "json"
  // }

Parameters

str: string

Returns

MediaType