console-formatted

3.9.15 • Public • Published

Setup

//requires and setups the package
const { console } = require('console-formatted')

With this you can still use the normal console.log it just added th new formated function to it

Use

console.format.log("Hello World!")

//this also works with: debug, info, warn and error

Console Log Picture

if You want to log it without the date use the option like below

console.format.log('Hello World!', {date: false})

Console No Date

Override the default color

If you want to override the default color u can use the color option like so

console.format.log('Hello World!', {color: "Yellow"})
console.format.log('Hello World!', {color: "Blue"})
console.format.log('Hello World!', {color: "Red"})

Override Colors

Colors

Colors can be used by calling the color function from the setup on setup u have to add colors to the require satment

like so

const {console, colors} = require('console-formatted')

Then Colors can be called and used in a console.log function like so

console.log(`${colors.text.Green}Hello ${colors.text.Blue} World${colors.text.Yellow}!${colors.other.Reset}`)

You can also call this in the format function like so

console.format.log(`${colors.text.Green}Hello ${colors.text.Blue} World${colors.text.Yellow}!${colors.other.Reset}`)

And the output would be

Colors Output

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i console-formatted

      Weekly Downloads

      1

      Version

      3.9.15

      License

      ISC

      Unpacked Size

      4.65 kB

      Total Files

      4

      Last publish

      Collaborators

      • gatewayduckyt