Skip to main content

@gnome/ansi@0.1.0
Built and signed on GitHub Actions

The ansi module provides color detection, writing ansi codes, and an ansi writer.

This package works with Bun, Cloudflare Workers, Node.js, Deno, Browsers
JSR Score
100%
Published
2 weeks ago (0.1.0)

@gnome/ansi

logo Work less. Do more.

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
View transparency log

Add Package

deno add @gnome/ansi

Import symbol

import * as mod from "@gnome/ansi";

Add Package

npx jsr add @gnome/ansi

Import symbol

import * as mod from "@gnome/ansi";

Add Package

yarn dlx jsr add @gnome/ansi

Import symbol

import * as mod from "@gnome/ansi";

Add Package

pnpm dlx jsr add @gnome/ansi

Import symbol

import * as mod from "@gnome/ansi";

Add Package

bunx jsr add @gnome/ansi

Import symbol

import * as mod from "@gnome/ansi";