legacy-compat.js 296 B

12345678910111213141516
  1. // sigh... life is hard
  2. if (!global.console) {
  3. console = {}
  4. }
  5. var fns = ['log', 'error', 'trace'];
  6. for (var i=0 ; i<fns.length ; ++i) {
  7. var fn = fns[i];
  8. if (!console[fn]) {
  9. console[fn] = function() {};
  10. }
  11. }
  12. if (!Array.isArray) {
  13. Array.isArray = require('isarray');
  14. }