3.9.15 • Published 2 years ago

console-formatted v3.9.15

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

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

3.9.15

2 years ago

3.8.15

2 years ago

3.7.15

2 years ago

3.5.15

2 years ago

3.5.13

2 years ago

2.3.6

2 years ago

2.3.5

2 years ago

1.3.0

2 years ago

1.1.0

2 years ago

1.2.0

2 years ago

1.0.0

2 years ago