Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as mod from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/showable.ts";

The Showable module contains utilities for working with the Showable algebraic data type. Showable is a structure that indicates that an instance can be converted to a string representation.

Showable provides a standardized way to convert any value to a human-readable string format. This is particularly useful for debugging, logging, and displaying values in user interfaces. The module includes utilities for creating Showable instances for complex data structures like objects and tuples.

§Variables

tuple

Create a Showable instance for a tuple type by providing Showable instances for each element in the tuple. The resulting show function will format the tuple as a string with square brackets and comma-separated values.

§Functions

struct

Create a Showable instance for an object type by providing Showable instances for each of its properties. The resulting show function will format the object as a string with property names and their string representations.

§Interfaces

Showable

A Showable structure has the method show, which converts a value to a string representation. This interface extends Hold to ensure type safety and consistency with other algebraic structures in the library.