How to use the electron-releases.filter function in electron-releases

To help you get started, we’ve selected a few electron-releases examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kilian / electron-to-chromium / build.js View on Github external
const request = require('request');
const allElectronVersions = require('electron-releases');
const fs = require('fs');

const electronVersions = {};
const electronFullVersions = {};
const chromiumVersions = {};
const chromiumFullVersions = {};

const makePrintable = mapping => JSON.stringify(mapping, null, "\t");

allElectronVersions
  .filter(x => x.deps)
  .forEach(item => {
    const {deps: electron} = item;
    
    if (!electron.version.includes("nightly")) {
      // simple list
      const simpleVersion = electron.version.split(".")[0] + "." + electron.version.split(".")[1];
      const chromeVersion = electron.chrome.split(".")[0];
      electronVersions[simpleVersion] = chromeVersion;
      chromiumVersions[chromeVersion] = simpleVersion;
    }

    // explicit list
    electronFullVersions[electron.version] = electron.chrome;
    if (!chromiumFullVersions[electron.chrome]) {
      chromiumFullVersions[electron.chrome] = [];

electron-releases

Complete and up-to-date info about every release of Electron

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular electron-releases functions