Skip to content

Simple JS library to extend String.prototype to add ANSI Terminal Color support.

License

Notifications You must be signed in to change notification settings

blister/ansi-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansi-colors

Simple JS library to extend String.prototype to add ANSI Terminal Color support.

Installation

$ npm install https://github.com/blister/ansi-colors

Usage

require('ansi-colors');

let coloredString = 'blister'.fg('green', 'bright').bg('blue').clearAll();
console.log(coloredString);

console.log(
	`${'colors'.fg('yellow').bg('red').clearAll()} ${'are'.fg('blue').bg('cyan').clearAll()} fun!`
);

console.log('Rainbow Foreground'.rfg());

const rbgStr = 'Rainbow Background';
console.log(rbgStr.rbg());

About

Simple JS library to extend String.prototype to add ANSI Terminal Color support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published