x/oak/mediaTyper.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
function parse
import { parse } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/mediaTyper.ts?s=parse";

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[src]

Returns

MediaType[src]