1
0
mirror of https://github.com/thangisme/notes.git synced 2024-10-31 23:37:18 -04:00
notes/node_modules/electron-to-chromium/index.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

27 lines
755 B
JavaScript

var versions = require('./versions');
var fullVersions = require('./versions');
var electronToChromium = function (query) {
var number = getQueryString(query);
return number.split('.').length > 2 ? fullVersions[number] : versions[number] || undefined;
}
var electronToBrowserList = function (query) {
var number = getQueryString(query);
return versions[number] ? "Chrome >= " + versions[number] : undefined;
}
var getQueryString = function (query) {
var number = query;
if (query === 1) { number = "1.0" }
if (typeof query === 'number') { number += ''; }
return number;
}
module.exports = {
versions: versions,
fullVersions: fullVersions,
electronToChromium: electronToChromium,
electronToBrowserList: electronToBrowserList
};