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
condenser-0.0.12 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
condenser-0.0.11 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
condenser-0.0.10 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
condenser-0.0.9 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
condenser-0.0.8 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/caniuse-lite/dist/unpacker/agents.js
jester-data-8.0.0 node_modules/caniuse-lite/dist/unpacker/agents.js
ezii-os-5.2.1 node_modules/caniuse-lite/dist/unpacker/agents.js
ezii-os-2.0.1 node_modules/caniuse-lite/dist/unpacker/agents.js
ezii-os-1.1.0 node_modules/caniuse-lite/dist/unpacker/agents.js
ezii-os-1.0.0 node_modules/caniuse-lite/dist/unpacker/agents.js
condenser-0.0.7 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
ezii-os-0.0.0.1.0 node_modules/caniuse-lite/dist/unpacker/agents.js
ezii-os-0.0.0.0.1 node_modules/caniuse-lite/dist/unpacker/agents.js
condenser-0.0.5 lib/condenser/processors/node_modules/caniuse-lite/dist/unpacker/agents.js
optimacms-0.4.3 spec/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
optimacms-0.4.2 spec/dummy/node_modules/caniuse-lite/dist/unpacker/agents.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/caniuse-lite/dist/unpacker/agents.js
locomotivecms-3.4.0 app/javascript/node_modules/caniuse-lite/dist/unpacker/agents.js
cortex-0.1.3 spec/dummy/node_modules/babel-preset-env/node_modules/caniuse-lite/dist/unpacker/agents.js