Skip to main content
Module

x/oak/deps.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
import * as oak from "https://deno.land/x/oak@v10.4.0/deps.ts";

Classes

A LimitedReader reads from reader but limits the amount of data returned to just limit bytes. Each call to read updates limit to reflect the new amount remaining. read returns null when limit <= 0 or when the underlying reader returns null.

Enums

Enum of HTTP status codes.

Variables

Map from status code to status text.

Functions

Decodes a given RFC4648 base64 encoded string

CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation

Compile a string to a template function for the path.

Concatenate multiple binary arrays and return new one.

Given an extension or media type, return the full Content-Type header string. Returns undefined if not resolvable.

Copy bytes from one Uint8Array to another. Bytes from src which don't fit into dst will not be copied.

Check whether binary arrays are equal to each other.

Given a media type, return the most appropriate extension or return undefined if there is none.

Given an extension, lookup the appropriate media type for that extension. Likely you should be using contentType() though instead.

Create path match function from path-to-regexp spec.

Parse a string for the raw tokens.

Normalize the given path string, returning a regular expression.

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

Create a Reader from a ReadableStreamDefaultReader.

Write all the content of the array buffer (arr) to the writer (w).