Skip to main content
Module

x/acorn/util.ts

A focused RESTful server framework for Deno 🌰🦕
Go to Latest
import * as acorn from "https://deno.land/x/acorn@0.7.1/util.ts";

Contains some internal utilities.

Functions

Offloads to the native Promise.withResolvers when available.

A type guard which determines if the value can be used as BodyInit for creating a body of a Response.

Determines if the runtime is Bun or not.

Determines if a string looks like HTML.

Determines if the string looks like JSON.

Determines if the runtime is Node.js or not.

Generate a Response based on the original Request and an HttpError. It will ensure negotiation of the content type and will provide the stack trace in errors that are marked as expose-able.