console.js 408 B

123456789101112
  1. var console;
  2. if (typeof global !== "undefined" && global.console) {
  3. console = global.console
  4. } else if (typeof window !== "undefined" && window.console) {
  5. console = window.console
  6. } else {
  7. console = window.console = {}
  8. }
  9. module.exports = console;
  10. for(var name in {log:1, info:1, error:1, warn:1, dir:1, trace:1, assert:1, time:1, timeEnd: 1})
  11. if(!console[name])
  12. console[name] = function() {};