README
What is this?
This is a better logger for terminal that includes a lot of cool and life improving features
Installation
npm install terminal-utils --save
Docs
Importing
By default you import a terminal constructor with which you can change different things
import TerminalUtils from "terminal-utils"
You can also import ready for use terminal
import { terminal } from "terminal-utils"
Constructor Configuration
const terminal = new TerminalUtils({timestamp:true})
/*When logging or using other functions will show time at which log was made
*Output with it on
*[9:29:31 SUCCESS] Yep, it was success
*Output with it off
*[SUCCESS] Yep, it was success
*/
All functions
Logs
terminal.success(message)
Logs out a message with green color and prefix SUCCESS
terminal.warning(message)
Logs out a message with green yellow and prefix WARNING
terminal.error(message)
Logs out a message with green red and prefix ERROR
terminal.running(message)
Logs out a message with magenta color and prefix RUNNING
terminal.debug(message)
Logs out a message with purple color and prefix DEBUG
terminal.info(message)
Logs out a message with blue color and prefix INFO
terminal.custom(message, color, title)
Logs out a message with set color and set prefix
It Supports all colors bellow
"red", "green", "blue", "yellow', "magenta", "cyan", "white"
Inputs
terminal.input(message)
Logs out a message with white color and prefix INPUT
It also allows for callback ".then" and ".catch" function after it and returns result like bellow
NOTE: It is async, so you can use await on it