Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
gnomejs/sdkThe ansi module provides color detection, writing ansi codes, and an ansi writer.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
9 months ago (0.2.0)
@gnome/ansi

Overview
The ansi
module provides color detection, writing ansi
codes, and an ansi writer.
Basic Usage
import { blue, ansiWriter, bgBlue, green, bold, apply } from "@gnome/ansi"; ansiWriter.write("Hello, World!").writeLine(); ansiWriter.debug("Hello, World!"); ansiWriter.info("Hello, World!"); ansiWriter.success("Hello, World!"); ansiWriter.writeLine(apply("Hello, World!", bold, green, bgBlue) + " test"); writer.info("An informational message"); writer.writeLine(blue("My message")); writer.writeLine(apply("Multiple Styles", bgBlue, bold));
License
MIT License and code from other sources are detailed in the License File
Built and signed on
GitHub Actions
Add Package
deno add jsr:@gnome/ansi
Import symbol
import * as ansi from "@gnome/ansi";
Import directly with a jsr specifier
import * as ansi from "jsr:@gnome/ansi";
Add Package
pnpm i jsr:@gnome/ansi
pnpm dlx jsr add @gnome/ansi
Import symbol
import * as ansi from "@gnome/ansi";
Add Package
yarn add jsr:@gnome/ansi
yarn dlx jsr add @gnome/ansi
Import symbol
import * as ansi from "@gnome/ansi";
Add Package
npx jsr add @gnome/ansi
Import symbol
import * as ansi from "@gnome/ansi";
Add Package
bunx jsr add @gnome/ansi
Import symbol
import * as ansi from "@gnome/ansi";