electron-to-chromium
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
The electron-to-chromium
npm package, developed by Kilian Valkhof, delivers a critical role in providing a host of mappings between Electron versions and the Chromium versions they use. With this functionality, other tools in the web development and JavaScript ecosystem - such as Browserslist, Autoprefixer, Stylelint, babel-preset-env, and eslint-plugin-compat - can efficiently resolve specific Electron version strings to their equivalent Chromium versions. This feature is rather beneficial for developing software that needs to accurately understand the specific capabilities of the underlying web rendering engine.
To utilize electron-to-chromium
, first install it via npm by npm install electron-to-chromium
. After installation, include Electron-to-Chromium in your project using require
:
var e2c = require('electron-to-chromium');
The package provides various properties like versions
, fullVersions
, chromiumVersions
, fullChromiumVersions
to get the corresponding major or full Chromium version for a given Electron version. You can also use the functions electronToChromium()
and chromiumToElectron()
for mapping between Electron and Chromium versions.
Code usage examples include:
var chromeVersion = e2c.electronToChromium('1.4'); // returns "53"
var electronVersion = e2c.chromiumToElectron('54'); // returns "1.4"
To retrieve just the versions, you can require individual lists:
var versions = require('electron-to-chromium/versions');
Please keep in mind that the electronToBrowserList()
function has been deprecated as Browserslist now includes electron-to-chromium.
Documentation for electron-to-chromium
can be found in its official repository on GitHub. On the README page, users can find comprehensive instructions on how to install, use, and update the program and it also offers handy code examples that illuminate default usage for developers.