10.3.7 • Published 3 years ago

console.browser v10.3.7

Weekly downloads
19
License
ISC
Repository
-
Last release
3 years ago

How to use / import

First of all, install the package by using npm or yarn by tapping:

npm install console.browser --save
//or
yarn add console.browser

You only need to import the package by destructuring the module :

const { console } = require("console.browser");
console.nor("Hey");

This will return the console object with more colors

If you want to nest colors you can take/add an other variable in the destructuring:

const { console, colors } = require("console.browser");
console.warn(
	"Hey",
	colors.inverse("Inverse this!"),
	colors.rainbow("I'm a rainbow !!")
);

Members

nor ⇒

Equivalent to console.log but outputs the data in a blue tint to be more visible when logging information

Kind: global variable Returns: Data with a blue tinit

ParamTypeDescription
...argsanyThe data to output

success ⇒

Outputs a success message to the console

Kind: global variable Returns: Data with green color

ParamTypeDescription
...argsanyThe data to output

Example

console.success("I just hacked Nasaaaaaaaaaaa !");

error ⇒

When debugging for example in a try{}catch{}

Kind: global variable Returns: Data with red color

ParamTypeDescription
...argsanyThe data to output

Example

console.error("OMG! I just did a stupid error!");

warn ⇒

Outputs a warning message to the console with a yellow color

Kind: global variable Returns: Data with yellow color

ParamTypeDescription
...argsanyThe data to output

Example

console.warn("The world will end in one week !");

info ⇒

Outputs an informational message to the console

Kind: global variable Returns: Data with dark blue color

ParamTypeDescription
...argsanyThe data to output

Example

console.info(
	"Did you know that Leonard de Vinci was born in 1452 in Anchiano ?"
);

rainbow ⇒

Outputs the multicolored data

Kind: global variable Returns: Rainbow output

ParamTypeDescription
...argsanyThe data to output

Example

console.rainbow(
	"The way I see it, if you want the rainbow, you gotta put up with the rain."
);

zebra ⇒

Outputs the data in black and white

Kind: global variable Returns: Zebra output

ParamTypeDescription
...argsanyThe data to output

Example

console.zebra(`Wait am i in savanna ?`);

bold ⇒

Outputs the data in bold

Kind: global variable Returns: Bold output

ParamTypeDescription
...argsanyThe data to output

Example

console.bold("I'm bold");

dim ⇒

Outputs the data in dim

Kind: global variable Returns: Dim output

ParamTypeDescription
...argsanyThe data to output

Example

console.dim("I'm a dim output !");

inverse ⇒

Outputs the inverse of the given data

Kind: global variable Returns: Inverse of the data

ParamTypeDescription
...argsanyThe data to output

Example

console.inverse("I'm a inverse output !");

italic ⇒

Outputs the data in italic

Kind: global variable Returns: Italic output

ParamTypeDescription
...argsanyThe data to output

Example

console.italic("I'm in italic !");

underline ⇒

Underlines the data

Kind: global variable Returns: Underlined output

ParamTypeDescription
...argsanyThe data to output

Example

console.underline("I'm underlined !");

allown ⇒

Isolates that given data to be more visible

Kind: global variable Returns: Isolated output

ParamTypeDescription
...argsanyThe data to output

Example

console.allown("This is isolated from the rest of the console");

newline ⇒

Shows each argument on a new line.

Kind: global variable Returns: Each argument on a new line

ParamTypeDescription
...argsanyThe data to output

Example

console.newline(
	"This is on the first line",
	"This is on the second line",
	"This is on the third line"
);

json ⇒

Shows each argument on a new line in a json format

Kind: global variable Returns: Each argument on a new line

ParamTypeDescription
...argsanyThe data to output

Example

console.json(name, surname, username); //equivalent to writing console.log({name}, "\n", {surname}, "\n", {username})
10.3.6

3 years ago

10.3.7

3 years ago

10.3.4

3 years ago

10.3.5

3 years ago

10.3.3

3 years ago

10.3.2

3 years ago

10.3.1

3 years ago

10.2.9

3 years ago

10.3.0

3 years ago

10.2.8

3 years ago

10.2.7

4 years ago

10.2.4

4 years ago

10.2.5

4 years ago

10.2.6

4 years ago

10.2.3

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago