forked from fabricjs/fabric.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscout.js
45 lines (43 loc) · 1.15 KB
/
scout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/** @ignore */
var scout = (function () {
var tests = { };
return {
addTest: function (moduleName, test) {
tests[moduleName] = test;
},
fetch: function () {
var modulesToFetch = [ ];
for (var moduleName in tests) {
if (tests[moduleName]()) {
modulesToFetch.push(moduleName);
}
}
return modulesToFetch.join(',');
}
};
})();
scout.addTest('json2', function () {
return typeof JSON === 'undefined';
});
scout.addTest('indexOf', function () {
return typeof Array.prototype.indexOf === 'undefined';
});
scout.addTest('forEach', function () {
return typeof Array.prototype.forEach === 'undefined';
});
scout.addTest('map', function () {
return typeof Array.prototype.map === 'undefined';
});
scout.addTest('every', function () {
return typeof Array.prototype.every === 'undefined';
});
scout.addTest('some', function () {
return typeof Array.prototype.some === 'undefined';
});
scout.addTest('filter', function () {
return typeof Array.prototype.filter === 'undefined';
});
scout.addTest('reduce', function () {
return typeof Array.prototype.reduce === 'undefined';
});
scout.fetch();