electron-to-chromium
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "electron-to-chromium", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Provides a list of electron-to-chromium version mappings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,11 +5,10 @@ # Electron-to-Chromium | ||
## Install | ||
Install using `npm install electron-to-chromium`. | ||
Install using `npm install electron-to-chromium`. | ||
## Usage | ||
to include electron-to-chromium, require it: | ||
to include electron-to-chromium, require it: | ||
```js | ||
var e2c = require('electron-to-chromium'); | ||
``` | ||
var e2c = require('electron-to-chromium'); | ||
``` | ||
@@ -21,18 +20,20 @@ ### Properties | ||
An object with all _major_ Electron versions as keys and their respective major Chromium version as string value. | ||
```js | ||
var versions = e2c.versions; | ||
console.log(versions['1.4']); | ||
// returns "53" | ||
``` | ||
var versions = e2c.versions; | ||
console.log(versions['1.4']); | ||
// returns "53" | ||
``` | ||
#### fullVersions | ||
An object with all Electron versions as keys and their respective Chromium version as value. | ||
```js | ||
var versions = e2c.fullVersions; | ||
console.log(versions['1.4.11']); | ||
// returns "53.0.2785.143" | ||
``` | ||
var versions = e2c.fullVersions; | ||
console.log(versions['1.4.11']); | ||
// returns "53.0.2785.143" | ||
``` | ||
#### electronToChromium(query) | ||
Properties: | ||
Arguments: | ||
* Query: string, required. A major or full electron version string. | ||
@@ -43,21 +44,24 @@ | ||
If you provide it with a major Electron version, it will return a major Chromium version: | ||
```js | ||
var chromeVersion = e2c.electronToChromium('1.4'); | ||
// chromeVersion is "53" | ||
``` | ||
var chromeVersion = e2c.electronToChromium('1.4'); | ||
// chromeVersion is "53" | ||
``` | ||
If you provide it with a full Electron version, it will return the full Chromium version. | ||
```js | ||
var chromeVersion = e2c.electronToChromium('1.4.11'); | ||
// chromeVersion is "53.0.2785.143" | ||
``` | ||
var chromeVersion = e2c.electronToChromium('1.4.11'); | ||
// chromeVersion is "53.0.2785.143" | ||
``` | ||
If a query does not match a Chromium version, it will return `undefined`. | ||
```js | ||
var chromeVersion = e2c.electronToChromium('9000'); | ||
// chromeVersion is undefined | ||
``` | ||
var chromeVersion = e2c.electronToChromium('9000'); | ||
// chromeVersion is undefined | ||
``` | ||
#### electronToBrowserList(query) | ||
Properties: | ||
Arguments: | ||
* Query: string, required. A major Electron version string. | ||
@@ -68,13 +72,14 @@ | ||
If you provide it with a major Electron version, it will return a Browserlist query string that matches the chromium capabilities: | ||
```js | ||
var query = e2c.electronToBrowserList('1.4'); | ||
// query is "Chrome >= 53" | ||
``` | ||
var query = e2c.electronToBrowserList('1.4'); | ||
// query is "Chrome >= 53" | ||
``` | ||
If a query does not match a Chromium version, it will return `undefined`. | ||
```js | ||
var query = e2c.electronToBrowserList('9000'); | ||
// query is undefined | ||
``` | ||
var query = e2c.electronToBrowserList('9000'); | ||
// query is undefined | ||
``` | ||
@@ -81,0 +86,0 @@ ## Updating |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86
8652