aswi2020vldc-gitlab/templetes/node_modules/events/tests/legacy-compat.js @ 143404cb
1 |
// sigh... life is hard
|
---|---|
2 |
if (!global.console) { |
3 |
console = {} |
4 |
}
|
5 |
|
6 |
var fns = ['log', 'error', 'trace']; |
7 |
for (var i=0 ; i<fns.length ; ++i) { |
8 |
var fn = fns[i]; |
9 |
if (!console[fn]) { |
10 |
console[fn] = function() {}; |
11 |
}
|
12 |
}
|
13 |
|
14 |
if (!Array.isArray) { |
15 |
Array.isArray = require('isarray'); |
16 |
}
|