source: imaps-frontend/node_modules/inline-style-prefixer/lib/generator/generatePluginList.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 3 months ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 838 bytes
Line 
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = getRecommendedPlugins;
7
8var _pluginMap = require('./maps/pluginMap');
9
10var _pluginMap2 = _interopRequireDefault(_pluginMap);
11
12function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14function getRecommendedPlugins(browserList) {
15 var recommendedPlugins = {};
16
17 for (var plugin in _pluginMap2.default) {
18 var browserSupportByPlugin = _pluginMap2.default[plugin];
19
20 for (var browser in browserSupportByPlugin) {
21 if (browserList.hasOwnProperty(browser)) {
22 var browserVersion = browserSupportByPlugin[browser];
23
24 if (browserList[browser] < browserVersion) {
25 recommendedPlugins[plugin] = true;
26 }
27 }
28 }
29 }
30
31 return Object.keys(recommendedPlugins);
32}
Note: See TracBrowser for help on using the repository browser.