0.0.5 • Published 2 years ago

coloured-text-common v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Coloured-text version

INDEX

Install

npm install coloured-text

npm i coloured-text

Usage

    import ct from "coloured-text";

    ct.showTemplates(); // This will show you templates from ct.msg

    console.log(ct.msg.info("LOADING...", 11)); // Output: "[i] LOADING..."

    console.log(
        ct.colors.print("HELLO WORLD!", {
            color: [ct.colors.fgColor.black, ct.colors.bgColor.cyan], 
            decoration: [ct.colors.decoration.underline]
        })
    ) // Output: HELLO WORLD! with cyan background, and underlined black text

    console.log(`${ct.colors.fgColor.green}HELLO WORLD!${ct.colors.end}`) // Output: HELLO WORLD! with green text

MSG Variants

    ct.msg.success("SomeText", 0 to 23);

success

    ct.msg.error("SomeText", 0 to 23);

error

    ct.msg.info("SomeText", 0 to 23);

info

Each one has 24 different options