source: trip-planner-front/node_modules/electron-to-chromium/index.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[6a3a178]1var versions = require('./versions');
2var fullVersions = require('./full-versions');
3var chromiumVersions = require('./chromium-versions');
4var fullChromiumVersions = require('./full-chromium-versions');
5
6var electronToChromium = function (query) {
7 var number = getQueryString(query);
8 return number.split('.').length > 2 ? fullVersions[number] : versions[number] || undefined;
9};
10
11var chromiumToElectron = function (query) {
12 var number = getQueryString(query);
13 return number.split('.').length > 2 ? fullChromiumVersions[number] : chromiumVersions[number] || undefined;
14};
15
16var electronToBrowserList = function (query) {
17 var number = getQueryString(query);
18 return versions[number] ? "Chrome >= " + versions[number] : undefined;
19};
20
21var getQueryString = function (query) {
22 var number = query;
23 if (query === 1) { number = "1.0" }
24 if (typeof query === 'number') { number += ''; }
25 return number;
26};
27
28module.exports = {
29 versions: versions,
30 fullVersions: fullVersions,
31 chromiumVersions: chromiumVersions,
32 fullChromiumVersions: fullChromiumVersions,
33 electronToChromium: electronToChromium,
34 electronToBrowserList: electronToBrowserList,
35 chromiumToElectron: chromiumToElectron
36};
Note: See TracBrowser for help on using the repository browser.