https://github.com/ralphtheninja/electron-version
Find the installed electron version
https://github.com/ralphtheninja/electron-version
electron
Last synced: 10 months ago
JSON representation
Find the installed electron version
- Host: GitHub
- URL: https://github.com/ralphtheninja/electron-version
- Owner: ralphtheninja
- License: mit
- Created: 2015-10-03T15:36:49.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T04:10:50.000Z (about 6 years ago)
- Last Synced: 2025-09-02T01:41:40.643Z (10 months ago)
- Topics: electron
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# electron-version
> Find the installed `electron` version

[](https://travis-ci.org/ralphtheninja/electron-version)
[](https://standardjs.com)
## Install
```
$ npm i electron-version -S
```
## Usage
Calls back with a version string if `electron` is installed.
```js
const electronVersion = require('electron-version')
electronVersion(function (err, v) {
console.log(err, v) // null 'v0.33.4'
})
```
You can optionally specify a custom path to the `electron` binary.
```js
const path = require('path')
const electronVersion = require('electron-version')
const electronPath = path.join(__dirname, 'node_modules/.bin/electron')
electronVersion(electronPath, function (err, v) {
console.log(err, v) // null 'v1.6.3'
})
```
## License
All code, unless stated otherwise, is licensed under the [`WTFPL`](http://www.wtfpl.net/txt/copying/) license.