Skip to main content
Module

x/attain/deps.ts

Deno API middleware Server
Latest
import * as attain from "https://deno.land/x/attain@1.1.2/deps.ts";

Classes

The EventEmitter class is defined and exposed by the events module:

Used to construct an HTTP server.

Enums

Enum of HTTP status codes.

Variables

Map from status code to status text.

Functions

f
acceptable
deprecated
f
acceptWebSocket
deprecated

Make an assertion, error will be thrown if expr does not have truthy value.

Set text color to blue.

Make the text bold.

f
contentType
deprecated

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

Set text color to cyan.

Creates a Promise with the reject and resolve functions placed as methods on the promise object itself. It allows you to do:

Ensures that the directory exists. If the directory structure does not exist, it is created. Like mkdir -p. Requires the --allow-read and --allow-write flag.

Check whether binary arrays are equal to each other.

f
extension
deprecated

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

Set text color to green.

Checks if value is an empty object, collection, map, or set.

f
listenAndServe
deprecated
f
lookup
deprecated

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

Set text color to magenta.

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

Take a set of command line arguments, with an optional set of options, and return an object representation of those argument.

Normalize the given path string, returning a regular expression.

Set text color to red.

Parses content as single YAML document.

Serializes object as a YAML document.

Set text color to yellow.