Skip to main content
Module

x/oak/util.ts

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Extremely Popular
Go to Latest
import * as oak from "https://deno.land/x/oak@14.2.0/util.ts";

Classes

A utility class that transforms "any" chunk into an Uint8Array.

Variables

Body types which will be coerced into strings before being sent.

Functions

Offloads to the native Promise.withResolvers when available.

Safely decode a URI component, where if it fails, instead of throwing, just returns the original string

Encodes the url preventing double enconding

Guard for Async Iterables

Determines if a string "looks" like HTML

Guard for Deno.Reader.

Create a ReadableStream<Uint8Array> from an AsyncIterable.

Create a ReadableStream<Uint8Array> from a Deno.Reader.

Returns u8 with leading white space removed.