main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
555 bytes
|
Line | |
---|
1 | import pluginMap from './maps/pluginMap';
|
---|
2 |
|
---|
3 | export default function getRecommendedPlugins(browserList) {
|
---|
4 | var recommendedPlugins = {};
|
---|
5 |
|
---|
6 | for (var plugin in pluginMap) {
|
---|
7 | var browserSupportByPlugin = pluginMap[plugin];
|
---|
8 |
|
---|
9 | for (var browser in browserSupportByPlugin) {
|
---|
10 | if (browserList.hasOwnProperty(browser)) {
|
---|
11 | var browserVersion = browserSupportByPlugin[browser];
|
---|
12 |
|
---|
13 | if (browserList[browser] < browserVersion) {
|
---|
14 | recommendedPlugins[plugin] = true;
|
---|
15 | }
|
---|
16 | }
|
---|
17 | }
|
---|
18 | }
|
---|
19 |
|
---|
20 | return Object.keys(recommendedPlugins);
|
---|
21 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.