nclr
Mini NPM package with coloured log functions and more.
Contributions
Please refer to the contribution guideline.
Contributors
Maximilian Berkmann 🐛 💻 📖 🤔 💬 👀 🛡️ ⚠️ |
Dependabot 🔧 |
Semantic Release Bot 📖 📦 |
Codacy Badger 📖 |
---|
Documentation
Table of Contents
index
Set of functions for coloured logs.
Parameters
data
...any
error
- See: log
Print an error.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
info
- See: log
Print an information.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
dbg
- See: log
Print a debug message.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
out
- See: log
Print an output.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
inp
- See: log
Print an input.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
warn
- See: log
Print a warning.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
quest
- See: log
Print a question.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
succ
- See: log
Print a success log.
Parameters
data
...any Data to print
Examples
;
Returns boolean Did it happened?
extend
Extend the current theme.
Parameters
Examples
Using extensions as methods:
const nclr = ;nclr;nclr;nclrdata42;
Using extensions as functions:
const nclr = ;nclr;const suc data = nclr;;;
- Throws Error Invalid extension key
clr
CLI colours.
clr
Colour/style theme for the CLI.
Type: {inp: string, out: Array<string>, info: string, error: string, warn: string, dbg: string, quest: string}
lib
Set of library functions for nclr.
log
STDOUT log.
Parameters
data
any Data to print
Examples
;
Returns boolean Did it happened?
use
Colourise something.
Parameters
name
string Name of the log in the themedata
...any Data
Examples
let information = ;
Nesting
;
- Throws Error Invalid name
Returns string Coloured output
restoreTheme
Restore the default fields of the theme.