Skip to main content
Module

x/kia/deps.ts

🦕 Simple terminal spinners for Deno
Latest
import * as kia from "https://deno.land/x/kia@0.4.1b/deps.ts";

Functions

Converts the input into a string. Objects, Sets and Maps are sorted so as to make tests less flaky

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

Make an assertion that actual includes the expected values. If not then an error will be thrown.

Make an assertion that actual and expected are equal, deeply. If not deeply equal, then throw.

Make an assertion that actual is not null or undefined. If not then throw.

Make an assertion that error is an Error. If not then an error will be thrown. An error class and a string that should be included in the error message can also be asserted.

Make an assertion that actual match RegExp expected. If not then throw.

Make an assertion that actual and expected are not equal, deeply. If not then throw.

Make an assertion that actual not match RegExp expected. If match then throw.

Make an assertion that actual and expected are not strictly equal. If the values are strictly equal then throw.

Make an assertion that actual object is a subset of expected object, deeply. If not, then throw.

Executes a function which returns a promise, expecting it to throw or reject. If it does not, then it throws. An error class and a string that should be included in the error message can also be asserted. Or you can pass a callback which will be passed the error, usually to apply some custom assertions on it.

Make an assertion that actual and expected are strictly equal. If not then throw.

Make an assertion that actual includes expected. If not then throw.

Executes a function, expecting it to throw. If it does not, then it throws. An error class and a string that should be included in the error message can also be asserted. Or you can pass a callback which will be passed the error, usually to apply some custom assertions on it.

Set background color to black.

Set background color to blue.

Set background color to bright black.

Set background color to bright blue.

Set background color to bright cyan.

Set background color to bright green.

Set background color to bright magenta.

Set background color to bright red.

Set background color to bright white.

Set background color to bright yellow.

Set background color to cyan.

Set background color to green.

Set background color to magenta.

Set background color to red.

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 background color to white.

Set background color to yellow.

Set text color to black.

Set text color to blue.

Make the text bold.

Set text color to bright black.

Set text color to bright blue.

Set text color to bright cyan.

Set text color to bright green.

Set text color to bright magenta.

Set text color to bright red.

Set text color to bright white.

Set text color to bright yellow.

Set text color to cyan.

The text emits only a small amount of light.

Get whether text color change is enabled or disabled.

Set text color to gray.

Set text color to green.

Make the text hidden.

Invert background color and text color.

Make the text italic.

Set text color to magenta.

Set text color to red.

Reset the text modified

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

Set changing text color to enabled or disabled

Put horizontal line through the center of the text.

Remove ANSI escape codes from the string.

Make the text underline.

Set text color to white.

Set text color to yellow.

Copies from src to dst until either EOF (null) is read from src or an error occurs. It resolves to the number of bytes copied or rejects with the first error encountered while copying.

Deep equality comparison used in assertions

Forcefully throws a failed assertion

Turns a Reader, r, into an async iterator.

Turns a ReaderSync, r, into an iterator.

Create a ReadableStream from any kind of iterable.

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

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

Synchronously reads Reader r until EOF (null) and returns the content as Uint8Array.

Create a Deno.Reader from an iterable of Uint8Arrays.

Create a Reader from a ReadableStreamDefaultReader.

Use this to stub out methods that will throw when invoked.

Use this to assert unreachable code.

Create a WritableStream from a Writer.

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

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

Create a Writer from a WritableStreamDefaultWriter.