source: trip-planner-front/node_modules/events/tests/legacy-compat.js@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 296 bytes
Line 
1// sigh... life is hard
2if (!global.console) {
3 console = {}
4}
5
6var fns = ['log', 'error', 'trace'];
7for (var i=0 ; i<fns.length ; ++i) {
8 var fn = fns[i];
9 if (!console[fn]) {
10 console[fn] = function() {};
11 }
12}
13
14if (!Array.isArray) {
15 Array.isArray = require('isarray');
16}
Note: See TracBrowser for help on using the repository browser.