Skip to content

Instantly share code, notes, and snippets.

View VictorCoding's full-sized avatar
💭
Breaking shit

Victor Ramos VictorCoding

💭
Breaking shit
  • Brownsville
View GitHub Profile
@VictorCoding
VictorCoding / logWithLabel.js
Created March 1, 2016 22:42 — forked from tkh44/logWithLabel.js
Little utility to format logs in a consistent manner
const a = { foo: 'bar' };
const b = 'I like cookies';
export const logWithLabel = (content, label, collapsed = false) => {
if (__DEVELOPMENT__) {
content = Array.isArray(content) ? content : [content];
console[collapsed ? 'groupCollapsed' : 'group'](label.toUpperCase());
content.forEach((c) => {