MCPcopy Create free account
hub / github.com/ReactJSResources/react-webpack-babel / debug

Function debug

public/bundle.js:738–759  ·  view source on GitHub ↗

* Create a debugger with the given `name`. * * @param {String} name * @return {Type} * @api public

(name)

Source from the content-addressed store, hash-verified

736 */
737
738 function debug(name) {
739 if (!debug.enabled(name)) return function(){};
740
741 return function(fmt){
742 fmt = coerce(fmt);
743
744 var curr = new Date;
745 var ms = curr - (debug[name] || curr);
746 debug[name] = curr;
747
748 fmt = name
749 + ' '
750 + fmt
751 + ' +' + debug.humanize(ms);
752
753 // This hackery is required for IE8
754 // where `console.log` doesn't have 'apply'
755 window.console
756 && console.log
757 && Function.prototype.apply.call(console.log, console, arguments);
758 }
759 }
760
761 /**
762 * The currently active debug mode names.

Callers 10

lookupFunction · 0.85
urlFunction · 0.85
bundle.jsFile · 0.85
encodeAsStringFunction · 0.85
decodeStringFunction · 0.85
onTransportOpenFunction · 0.85
onerrorFunction · 0.85
onupgradeFunction · 0.85
closeFunction · 0.85
pauseFunction · 0.85

Calls 1

coerceFunction · 0.85

Tested by

no test coverage detected