Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/crayon/src/crayon.ts

๐Ÿ–๏ธ Terminal styling done light and fast.
Latest
import * as crayon from "https://deno.land/x/crayon@3.3.3/src/crayon.ts";

Variables

An object that expresses how well terminal supports displaying colors

๐Ÿ–๏ธ Crayon object that's used for styling

  • Call the last property as a function with arguments to get styled string

Map containing all style functions used by crayon

Object, which gets set as the prototype of every generated crayon instance in generateCrayon() function

Map containing all styles used by crayon

Functions

Uses mapFunc on every given function

  • func.name will be considered as name parameter

Uses mapStyle on every given style code

  • map key will be used as name parameter

Type Aliases

Crayon type which can be easily extended C - literal string type for extending styles O - object which expands