basant307/AI_Governance_Project
048
1### Made by [@kilianvalkhof](https://twitter.com/kilianvalkhof)2 3#### Other projects:4 5- ๐ป [Polypane](https://polypane.app) - Develop responsive websites and apps twice as fast on multiple screens at once6- ๐๏ธ [Superposition](https://superposition.design) - Kickstart your design system by extracting design tokens from your website7- ๐๏ธ [FromScratch](https://fromscratch.rocks) - A smart but simple autosaving scratchpad8 9---10 11# Electron-to-Chromium [](https://www.npmjs.com/package/electron-to-chromium) [](https://travis-ci.org/Kilian/electron-to-chromium) [](https://www.npmjs.com/package/electron-to-chromium) [](https://codecov.io/gh/Kilian/electron-to-chromium)[](https://app.fossa.io/projects/git%2Bgithub.com%2FKilian%2Felectron-to-chromium?ref=badge_shield)12 13This repository provides a mapping of Electron versions to the Chromium version that it uses.14 15This package is used in [Browserslist](https://github.com/ai/browserslist), so you can use e.g. `electron >= 1.4` in [Autoprefixer](https://github.com/postcss/autoprefixer), [Stylelint](https://github.com/stylelint/stylelint), [babel-preset-env](https://github.com/babel/babel-preset-env) and [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat).16 17**Supported by:**18 19 <a href="https://m.do.co/c/bb22ea58e765">20 <img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px">21 </a>22 23 24## Install25Install using `npm install electron-to-chromium`.26 27## Usage28To include Electron-to-Chromium, require it:29 30```js31var e2c = require('electron-to-chromium');32```33 34### Properties35The Electron-to-Chromium object has 4 properties to use:36 37#### `versions`38An object of key-value pairs with a _major_ Electron version as the key, and the corresponding major Chromium version as the value.39 40```js41var versions = e2c.versions;42console.log(versions['1.4']);43// returns "53"44```45 46#### `fullVersions`47An object of key-value pairs with a Electron version as the key, and the corresponding full Chromium version as the value.48 49```js50var versions = e2c.fullVersions;51console.log(versions['1.4.11']);52// returns "53.0.2785.143"53```54 55#### `chromiumVersions`56An object of key-value pairs with a _major_ Chromium version as the key, and the corresponding major Electron version as the value.57 58```js59var versions = e2c.chromiumVersions;60console.log(versions['54']);61// returns "1.4"62```63 64#### `fullChromiumVersions`65An object of key-value pairs with a Chromium version as the key, and an array of the corresponding major Electron versions as the value.66 67```js68var versions = e2c.fullChromiumVersions;69console.log(versions['54.0.2840.101']);70// returns ["1.5.1", "1.5.0"]71```72### Functions73 74#### `electronToChromium(query)`75Arguments:76* Query: string or number, required. A major or full Electron version.77 78A function that returns the corresponding Chromium version for a given Electron function. Returns a string.79 80If you provide it with a major Electron version, it will return a major Chromium version:81 82```js83var chromeVersion = e2c.electronToChromium('1.4');84// chromeVersion is "53"85```86 87If you provide it with a full Electron version, it will return the full Chromium version.88 89```js90var chromeVersion = e2c.electronToChromium('1.4.11');91// chromeVersion is "53.0.2785.143"92```93 94If a query does not match a Chromium version, it will return `undefined`.95 96```js97var chromeVersion = e2c.electronToChromium('9000');98// chromeVersion is undefined99```100 101#### `chromiumToElectron(query)`102Arguments:103* Query: string or number, required. A major or full Chromium version.104 105Returns a string with the corresponding Electron version for a given Chromium query.106 107If you provide it with a major Chromium version, it will return a major Electron version:108 109```js110var electronVersion = e2c.chromiumToElectron('54');111// electronVersion is "1.4"112```113 114If you provide it with a full Chrome version, it will return an array of full Electron versions.115 116```js117var electronVersions = e2c.chromiumToElectron('56.0.2924.87');118// electronVersions is ["1.6.3", "1.6.2", "1.6.1", "1.6.0"]119```120 121If a query does not match an Electron version, it will return `undefined`.122 123```js124var electronVersion = e2c.chromiumToElectron('10');125// electronVersion is undefined126```127 128#### `electronToBrowserList(query)` **DEPRECATED**129Arguments:130* Query: string or number, required. A major Electron version.131 132_**Deprecated**: Browserlist already includes electron-to-chromium._133 134A function that returns a [Browserslist](https://github.com/ai/browserslist) query that matches the given major Electron version. Returns a string.135 136If you provide it with a major Electron version, it will return a Browserlist query string that matches the Chromium capabilities:137 138```js139var query = e2c.electronToBrowserList('1.4');140// query is "Chrome >= 53"141```142 143If a query does not match a Chromium version, it will return `undefined`.144 145```js146var query = e2c.electronToBrowserList('9000');147// query is undefined148```149 150### Importing just versions, fullVersions, chromiumVersions and fullChromiumVersions151All lists can be imported on their own, if file size is a concern.152 153#### `versions`154 155```js156var versions = require('electron-to-chromium/versions');157```158 159#### `fullVersions`160 161```js162var fullVersions = require('electron-to-chromium/full-versions');163```164 165#### `chromiumVersions`166 167```js168var chromiumVersions = require('electron-to-chromium/chromium-versions');169```170 171#### `fullChromiumVersions`172 173```js174var fullChromiumVersions = require('electron-to-chromium/full-chromium-versions');175```176 177## Updating178This package will be updated with each new Electron release.179 180To update the list, run `npm run build.js`. Requires internet access as it downloads from the canonical list of Electron versions.181 182To verify correct behaviour, run `npm test`.183 184 185## License186[](https://app.fossa.io/projects/git%2Bgithub.com%2FKilian%2Felectron-to-chromium?ref=badge_large)187 