Namespace: console

console

Methods

<static> colors(color)

Define color shortcut methods on the console.
Parameters:
Name Type Description
color string the CSS color rule to apply
Source:
Example
console.style('Wow, this is ' + console.colors.green('so much') + ' better!');

<static> style(text)

Intuitively Style Browser Console Text with CSS.
Parameters:
Name Type Description
text the text to style
Source:
Example
console.style('Wow, this is <css="color:green;font-weight:bold;">so much</css> better!');

<static> wrap(text, rule) → {string}

Wraps the given text in a tag with the provided style rules.
Parameters:
Name Type Description
text string the text to wrap
rule string CSS rules to apply
Source:
Returns:
- the wrapped text
Type
string
Example
console.style('I just ' + console.style.wrap('love', 'color:#c00;font-weight:bold;') + ' console.style');