Sha256: ed8cb217aaddd71e23f5e149671ba9fbf1584904cb5ecb5c951fcacadb4d1f8b

Contents?: true

Size: 1.75 KB

Versions: 83

Compression:

Stored size: 1.75 KB

Contents

'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.agents = undefined;

var _browsers = require('./browsers');

var _browserVersions = require('./browserVersions');

var agentsData = require('../../data/agents');

function unpackBrowserVersions(versionsData) {
    return Object.keys(versionsData).reduce(function (usage, version) {
        usage[_browserVersions.browserVersions[version]] = versionsData[version];
        return usage;
    }, {});
}

var agents = exports.agents = Object.keys(agentsData).reduce(function (map, key) {
    var versionsData = agentsData[key];
    map[_browsers.browsers[key]] = Object.keys(versionsData).reduce(function (data, entry) {
        if (entry === 'A') {
            data.usage_global = unpackBrowserVersions(versionsData[entry]);
        } else if (entry === 'C') {
            data.versions = versionsData[entry].reduce(function (list, version) {
                if (version === '') {
                    list.push(null);
                } else {
                    list.push(_browserVersions.browserVersions[version]);
                }
                return list;
            }, []);
        } else if (entry === 'D') {
            data.prefix_exceptions = unpackBrowserVersions(versionsData[entry]);
        } else if (entry === 'E') {
            data.browser = versionsData[entry];
        } else if (entry === 'F') {
            data.release_date = Object.keys(versionsData[entry]).reduce(function (map, key) {
                map[_browserVersions.browserVersions[key]] = versionsData[entry][key];
                return map;
            }, {});
        } else {
            // entry is B
            data.prefix = versionsData[entry];
        }
        return data;
    }, {});
    return map;
}, {});

Version data entries

83 entries across 81 versions & 16 rubygems

Version Path
boring_generators-0.15.0 tmp/templates/app_template/node_modules/caniuse-lite/dist/unpacker/agents.js
boring_generators-0.14.0 tmp/templates/app_template/node_modules/caniuse-lite/dist/unpacker/agents.js
optimacms-0.1.61 spec/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
boring_generators-0.13.0 tmp/templates/app_template/node_modules/caniuse-lite/dist/unpacker/agents.js
boring_generators-0.12.0 tmp/templates/app_template/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.18.0 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.18.2 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
trusty-cms-5.0.7 node_modules/caniuse-lite/dist/unpacker/agents.js
trusty-cms-5.0.6 node_modules/caniuse-lite/dist/unpacker/agents.js
trusty-cms-5.0.5 node_modules/caniuse-lite/dist/unpacker/agents.js
trusty-cms-5.0.4 node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.16.1 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.15.2 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
trusty-cms-5.0.3 node_modules/caniuse-lite/dist/unpacker/agents.js
trusty-cms-5.0.2 node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.18.4 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.18.1 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.14.0 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js