\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8297}{}\doxysubsubsection{Other projects\+:}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8297}

\begin{DoxyItemize}
\item 💻 \href{https://polypane.app}{\texttt{ Polypane}} -\/ Develop responsive websites and apps twice as fast on multiple screens at once
\item 🖌️ \href{https://superposition.design}{\texttt{ Superposition}} -\/ Kickstart your design system by extracting design tokens from your website
\item 🗒️ \href{https://fromscratch.rocks}{\texttt{ From\+Scratch}} -\/ A smart but simple autosaving scratchpad
\end{DoxyItemize}

\DoxyHorRuler{0}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8299}{}\doxysection{Electron-\/to-\/\+Chromium $<$a href=\char`\"{}https\+://www.\+npmjs.\+com/package/electron-\/to-\/chromium\char`\"{}$>$$<$img src=\char`\"{}https\+://img.\+shields.\+io/npm/v/electron-\/to-\/chromium.\+svg\char`\"{} alt=\char`\"{}npm\char`\"{}/$>$$<$/a$>$ $<$a href=\char`\"{}https\+://travis-\/ci.\+org/\+Kilian/electron-\/to-\/chromium\char`\"{}$>$$<$img src=\char`\"{}https\+://img.\+shields.\+io/travis/\+Kilian/electron-\/to-\/chromium/master.\+svg\char`\"{} alt=\char`\"{}travis\char`\"{}/$>$$<$/a$>$ $<$a href=\char`\"{}https\+://www.\+npmjs.\+com/package/electron-\/to-\/chromium\char`\"{}$>$$<$img src=\char`\"{}https\+://img.\+shields.\+io/npm/dm/electron-\/to-\/chromium.\+svg\char`\"{} alt=\char`\"{}npm-\/downloads\char`\"{}/$>$$<$/a$>$ $<$a href=\char`\"{}https\+://codecov.\+io/gh/\+Kilian/electron-\/to-\/chromium\char`\"{}$>$$<$img src=\char`\"{}https\+://codecov.\+io/gh/\+Kilian/electron-\/to-\/chromium/branch/master/graph/badge.\+svg\char`\"{} alt=\char`\"{}codecov\char`\"{}/$>$$<$/a$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8299}
\href{https://app.fossa.io/projects/git\%2Bgithub.com\%2FKilian\%2Felectron-to-chromium?ref=badge_shield}{\texttt{ }}

This repository provides a mapping of Electron versions to the Chromium version that it uses.

This package is used in \href{https://github.com/ai/browserslist}{\texttt{ Browserslist}}, so you can use e.\+g. {\ttfamily electron $>$= 1.\+4} in \href{https://github.com/postcss/autoprefixer}{\texttt{ Autoprefixer}}, \href{https://github.com/stylelint/stylelint}{\texttt{ Stylelint}}, \href{https://github.com/babel/babel-preset-env}{\texttt{ babel-\/preset-\/env}} and \href{https://github.com/amilajack/eslint-plugin-compat}{\texttt{ eslint-\/plugin-\/compat}}.\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8300}{}\doxysubsection{Install}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8300}
Install using {\ttfamily npm install electron-\/to-\/chromium}.\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8301}{}\doxysubsection{Usage}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8301}
To include Electron-\/to-\/\+Chromium, require it\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var e2c = require('electron-\/to-\/chromium'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8302}{}\doxysubsubsection{Properties}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8302}
The Electron-\/to-\/\+Chromium object has 4 properties to use\+:\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8303}{}\doxyparagraph{$<$tt$>$versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8303}
An object of key-\/value pairs with a {\itshape major} Electron version as the key, and the corresponding major Chromium version as the value.


\begin{DoxyCode}{0}
\DoxyCodeLine{var versions = e2c.versions;}
\DoxyCodeLine{console.log(versions['1.4']);}
\DoxyCodeLine{// returns "{}53"{} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8304}{}\doxyparagraph{$<$tt$>$full\+Versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8304}
An object of key-\/value pairs with a Electron version as the key, and the corresponding full Chromium version as the value.


\begin{DoxyCode}{0}
\DoxyCodeLine{var versions = e2c.fullVersions;}
\DoxyCodeLine{console.log(versions['1.4.11']);}
\DoxyCodeLine{// returns "{}53.0.2785.143"{} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8305}{}\doxyparagraph{$<$tt$>$chromium\+Versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8305}
An object of key-\/value pairs with a {\itshape major} Chromium version as the key, and the corresponding major Electron version as the value.


\begin{DoxyCode}{0}
\DoxyCodeLine{var versions = e2c.chromiumVersions;}
\DoxyCodeLine{console.log(versions['54']);}
\DoxyCodeLine{// returns "{}1.4"{} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8306}{}\doxyparagraph{$<$tt$>$full\+Chromium\+Versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8306}
An object of key-\/value pairs with a Chromium version as the key, and an array of the corresponding major Electron versions as the value.


\begin{DoxyCode}{0}
\DoxyCodeLine{var versions = e2c.fullChromiumVersions;}
\DoxyCodeLine{console.log(versions['54.0.2840.101']);}
\DoxyCodeLine{// returns ["{}1.5.1"{}, "{}1.5.0"{}] }

\end{DoxyCode}
 \hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8307}{}\doxysubsubsection{Functions}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8307}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8308}{}\doxyparagraph{$<$tt$>$electron\+To\+Chromium(query)$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8308}
Arguments\+:
\begin{DoxyItemize}
\item Query\+: string or number, required. A major or full Electron version.
\end{DoxyItemize}

A function that returns the corresponding Chromium version for a given Electron function. Returns a string.

If you provide it with a major Electron version, it will return a major Chromium version\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var chromeVersion = e2c.electronToChromium('1.4');}
\DoxyCodeLine{// chromeVersion is "{}53"{} }

\end{DoxyCode}


If you provide it with a full Electron version, it will return the full Chromium version.


\begin{DoxyCode}{0}
\DoxyCodeLine{var chromeVersion = e2c.electronToChromium('1.4.11');}
\DoxyCodeLine{// chromeVersion is "{}53.0.2785.143"{} }

\end{DoxyCode}


If a query does not match a Chromium version, it will return {\ttfamily undefined}.


\begin{DoxyCode}{0}
\DoxyCodeLine{var chromeVersion = e2c.electronToChromium('9000');}
\DoxyCodeLine{// chromeVersion is undefined }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8309}{}\doxyparagraph{$<$tt$>$chromium\+To\+Electron(query)$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8309}
Arguments\+:
\begin{DoxyItemize}
\item Query\+: string or number, required. A major or full Chromium version.
\end{DoxyItemize}

Returns a string with the corresponding Electron version for a given Chromium query.

If you provide it with a major Chromium version, it will return a major Electron version\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var electronVersion = e2c.chromiumToElectron('54');}
\DoxyCodeLine{// electronVersion is "{}1.4"{} }

\end{DoxyCode}


If you provide it with a full Chrome version, it will return an array of full Electron versions.


\begin{DoxyCode}{0}
\DoxyCodeLine{var electronVersions = e2c.chromiumToElectron('56.0.2924.87');}
\DoxyCodeLine{// electronVersions is ["{}1.6.3"{}, "{}1.6.2"{}, "{}1.6.1"{}, "{}1.6.0"{}] }

\end{DoxyCode}


If a query does not match an Electron version, it will return {\ttfamily undefined}.


\begin{DoxyCode}{0}
\DoxyCodeLine{var electronVersion = e2c.chromiumToElectron('10');}
\DoxyCodeLine{// chromeVersion is undefined }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8310}{}\doxyparagraph{$<$tt$>$electron\+To\+Browser\+List(query)$<$/tt$>$ $<$strong$>$\+DEPRECATED$<$/strong$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8310}
Arguments\+:
\begin{DoxyItemize}
\item Query\+: string or number, required. A major Electron version.
\end{DoxyItemize}

{\itshape {\bfseries{Deprecated}}\+: Browserlist already includes electron-\/to-\/chromium.}

A function that returns a \href{https://github.com/ai/browserslist}{\texttt{ Browserslist}} query that matches the given major Electron version. Returns a string.

If you provide it with a major Electron version, it will return a Browserlist query string that matches the Chromium capabilities\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var query = e2c.electronToBrowserList('1.4');}
\DoxyCodeLine{// query is "{}Chrome >= 53"{} }

\end{DoxyCode}


If a query does not match a Chromium version, it will return {\ttfamily undefined}.


\begin{DoxyCode}{0}
\DoxyCodeLine{var query = e2c.electronToBrowserList('9000');}
\DoxyCodeLine{// query is undefined }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8311}{}\doxysubsubsection{Importing just versions, full\+Versions, chromium\+Versions and full\+Chromium\+Versions}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8311}
All lists can be imported on their own, if file size is a concern.\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8312}{}\doxyparagraph{$<$tt$>$versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8312}

\begin{DoxyCode}{0}
\DoxyCodeLine{var versions = require('electron-\/to-\/chromium/versions'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8313}{}\doxyparagraph{$<$tt$>$full\+Versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8313}

\begin{DoxyCode}{0}
\DoxyCodeLine{var fullVersions = require('electron-\/to-\/chromium/full-\/versions'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8314}{}\doxyparagraph{$<$tt$>$chromium\+Versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8314}

\begin{DoxyCode}{0}
\DoxyCodeLine{var chromiumVersions = require('electron-\/to-\/chromium/chromium-\/versions'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8315}{}\doxyparagraph{$<$tt$>$full\+Chromium\+Versions$<$/tt$>$}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8315}

\begin{DoxyCode}{0}
\DoxyCodeLine{var fullChromiumVersions = require('electron-\/to-\/chromium/full-\/chromium-\/versions'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8316}{}\doxysubsection{Updating}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8316}
This package will be updated with each new Electron release.

To update the list, run {\ttfamily npm run build.\+js}. Requires internet access as it downloads from the canonical list of Electron versions.

To verify correct behaviour, run {\ttfamily npm test}.\hypertarget{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8317}{}\doxysubsection{License}\label{md_sfcode_node_modules_electron_to_chromium_README_autotoc_md8317}
\href{https://app.fossa.io/projects/git\%2Bgithub.com\%2FKilian\%2Felectron-to-chromium?ref=badge_large}{\texttt{ }} 