Commit | Line | Data |
---|---|---|
a14ed8aa DV |
1 | // Console-polyfill. MIT license. |
2 | // https://github.com/paulmillr/console-polyfill | |
3 | // Make it safe to do console.log() always. | |
4 | (function(con) { | |
5 | 'use strict'; | |
6 | var prop, method; | |
7 | var empty = {}; | |
8 | var dummy = function() {}; | |
9 | var properties = 'memory'.split(','); | |
10 | var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' + | |
11 | 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' + | |
12 | 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(','); | |
13 | while (prop = properties.pop()) con[prop] = con[prop] || empty; | |
14 | while (method = methods.pop()) con[method] = con[method] || dummy; | |
15 | })(this.console = this.console || {}); // Using `this` for web workers. |