-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefaults.js
More file actions
36 lines (32 loc) · 762 Bytes
/
Copy pathdefaults.js
File metadata and controls
36 lines (32 loc) · 762 Bytes
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
var DEFAULTS_COMMON = {
"totalseats": 169,
"areafactor": 1.8,
"globalseatsperdistrict": 1,
"localthreshold": 0.0,
"globalthreshold": 4.0,
"globalthresholdonlyleveling": true,
"method": "Sainte-Laguë fra 1,4",
"minzeroglobalseats": true,
"exemptglobalthreshold": false,
"mergedistricts": "19 fylker (før 2018)",
"extravotes": 0,
"extraparty": "",
"extradistrict": "",
};
var DEFAULTS_BEFORE_2025 = {
"minlocalseats": 0,
"requireglobalrepresentation": false,
};
var DEFAULTS_AFTER_2025 = {
"minlocalseats": 4,
"requireglobalrepresentation": true,
};
function merge2(dict1, dict2) {
for (var key in dict2) {
dict1[key] = dict2[key];
}
return dict1;
}
function merge3(dict1, dict2, dict3) {
return merge2(merge2(dict1, dict2), dict3);
}