anstyle
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

Anstyle

A very simple utility to change colors and styles of command line outputs (logs)

npm (scoped) install size downloads
license Forks Stars

npm i anstyle

or:

yarn add anstyle

Sample

import {BOLD, BLUE, GREEN, RED, NORMAL, RESET} from 'anstyle'
console.log(`This ${BOLD}is a ${BLUE}rich${NORMAL} and ${RED}colorful ${GREEN}text${RESET}.`)

Prints:

sample-output.png

You can summarize the above:

import {D, B, G, N, R, T} from 'anstyle'
console.log(`This ${D}is a ${B}rich${N} and ${R}colorful ${G}text${T}.`)

API reference

The source is very simple and illustrative. It's your document: main.ts

Package Sidebar

Install

npm i anstyle

Weekly Downloads

5

Version

2.1.3

License

MIT

Unpacked Size

19.2 kB

Total Files

5

Last publish

Collaborators

  • mirismaili