blob: e09ae360324c49f19b4db33e88b313bd8faadb1b (
plain)
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
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = unpackRegion;
var _browsers = require('./browsers');
function unpackRegion(packed) {
return Object.keys(packed).reduce(function (list, browser) {
var data = packed[browser];
list[_browsers.browsers[browser]] = Object.keys(data).reduce(function (memo, key) {
var stats = data[key];
if (key === '_') {
stats.split(' ').forEach(function (version) {
return memo[version] = null;
});
} else {
memo[key] = stats;
}
return memo;
}, {});
return list;
}, {});
}
|