Skip to content

maksymkulia/ui-terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI Terminal

version dependencies devDependencies Twitter Follow

Basic helper for node js terminal. No dependencies.


Installation

npm i ui-terminal

Methods

Simple console log

let ut = require("ui-terminal"); // Include ui-terminal module

let data = "Hello world!"; // Variables

ut.e(data); // Simple output (like console.log)

Simple console log with text in color

Available colors:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
let ut = require("ui-terminal"); // Include ui-terminal module

// Test variables
let data = "Hello world!";
let color = "red";

ut.incolor(data, color); // Simple output with text in color

Simple console log with background color

Available colors:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
let ut = require("ui-terminal"); // Include ui-terminal module

// Test variables
let data = "Hello world!";
let bgcolor = "green";

ut.bgcolor(data, color); // Simple output with background color

Make only part of console.log in color

Available colors:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
let ut = require("../index"); // Include module

// Test variables
let cyan = "In cyan";
let green = "in green";

console.log(`${ut.incyan(cyan)} and ${ut.ingreen(green)}`); // Simple console.log with coloring part of text

ToDo

  • Custom styles
  • Banners creator
  • Matrix generator
  • Easter egg creator
  • Loader
  • Wiki pages