Skip to main content
Module

x/aleph/std.ts

The Full-stack Framework in Deno.
Go to Latest
import * as aleph from "https://deno.land/x/aleph@v0.2.21/std.ts";

Classes

A class to extract a tar archive

Functions

Set background color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

Set background color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

Set text color using 24bit rgb. color can be a number in range 0x000000 to 0xffffff or an Rgb.

Set text color using paletted 8bit colors. https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

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.

Start an HTTP server with given options and request handler

Determines the common path from a set of paths, using an optional separator, which defaults to the OS default separator.

Convert a glob string to a regular expression.

Test whether the given string is a glob

Like join(), but doesn't collapse "**/.." when globstar is true.

Like normalize(), but doesn't collapse "**/.." when globstar is true.

Create a HTTP server

Walks the file tree rooted at root, yielding each file or directory in the tree filtered according to the given options. The files are walked in lexical order, which makes the output deterministic but means that for very large directories walk() can be inefficient.

Return whether given headers is acceptable for websocket

Upgrade given TCP connection into websocket connection

Create sec-websocket-accept header value with given nonce

Create WebSocket-Sec-Key. Base64 encoded 16 bytes string

Read websocket frame from given BufReader

Unmask masked websocket payload

Write websocket frame to given writer

Interfaces

A parsed path object generated by path.parse() or consumed by path.format().

Interface of HTTP server response. If body is a Reader, response would be chunked. If body is a string, it would be UTF-8 encoded by default.