-
Notifications
You must be signed in to change notification settings - Fork 1
/
black-classes.js
44 lines (38 loc) · 1.11 KB
/
black-classes.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
let classes = new Map()
import eve from './black-classes/eve.js'
import sof from './black-classes/sof.js'
import tr2 from './black-classes/tr2.js'
import tri from './black-classes/tri.js'
import aud from './black-classes/aud.js'
function define(map, arg1, arg2)
{
switch (typeof arg1)
{
case 'object':
for (const key in arg1) {
if (arg1.hasOwnProperty(key) && key.indexOf("__") !== 0) {
define(map, key, arg1[key]);
}
}
break;
case 'string':
const properties = [];
if (arg2) {
for (const key in arg2) {
if (arg2.hasOwnProperty(key) && key.indexOf("__") !== 0) {
properties.push([ key, arg2[key] ]);
}
}
}
map.set(arg1, new Map(properties));
break;
default:
throw new ReferenceError('Invalid argument(s)')
}
}
define(classes, eve);
define(classes, sof);
define(classes, tr2);
define(classes, tri);
define(classes, aud);
export default classes