Skip to main content
Home

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

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

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
9 months ago (0.2.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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@gnome/ansi

Import symbol

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

Import directly with a jsr specifier

import * as ansi from "jsr:@gnome/ansi";

Add Package

pnpm i jsr:@gnome/ansi
or (using pnpm 10.8 or older)
pnpm dlx jsr add @gnome/ansi

Import symbol

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

Add Package

yarn add jsr:@gnome/ansi
or (using Yarn 4.8 or older)
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";