Skip to content

Instantly share code, notes, and snippets.

@dmh2
dmh2 / ConsoleLogUtility.js
Last active February 6, 2017 05:44
x-browser utility for logging styled messages to the browser JS console
class ConsoleLogUtility {
constructor() {
}
/**
* Log a message to the console and an optional bg color for compliant browser dev consoles (e.g. Chrome).
* TODO: pass a styles object for further layout specialization.
**/
consoleLog (message, bgColor='#ded') {
if(typeof(console) !== "undefined" && console.log !== undefined) {