Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

unicorn

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unicorn

Add some color to your command line.

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
1.3K
-29.28%
Maintainers
1
Weekly downloads
 
Created
Source

#unicorn Add some color to your command line.

Available styles

ColorsSpecials
BlackNormal
RedBold
GreenUnderline
YellowBlinking
BlueReverse
Magenta
Cyan
White

Installation

Unicorn is available through NPM, so all you have to do is:

npm install unicorn

Usage

Unicorn extends the String class to add his features so you don't need to save a reference to it. Just make sure you've installed the module.:

require('unicorn').install();

Colors

console.log('red'.red());
console.log('background red'.red(true));
console.log('green'.green());
console.log('background green'.green(true));
console.log('background blue and yellow text'.green(true).yellow());
console.log('background white and black text'.white(true).black());

colors

Specials

console.log('thin'.normal());
console.log('bold'.bold());
console.log('underline'.underline());
console.log('blinking'.blinking());
console.log('reverse'.reverse());

specials

Mixed

console.log('foo'.red().yellow(true).bold());
console.log('bar'.green(true).underline().black());
console.log('lorem'.underline().magenta(true).white());
console.log('ipsum'.bold().magenta().blue(true));

mixed

Unicorn

The best feature.

var i = 5;
while(i > 0) {
	console.log('UNICORN'.unicorn());
	--i;
}

mixed

License

Unicorn is available under MIT license.

Keywords

unicorn

FAQs

Package last updated on 31 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts