
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
is-electron
Advanced tools
Detect if running in Electron.
npm install --save is-electron
import isElectron from 'is-electron';
console.log(isElectron());
Copyright (c) 2016 Cheton Wu
Licensed under the MIT License.
Similar to is-electron, electron-is provides checks to determine if the code is running in an Electron environment. It offers additional checks like `is.dev()`, `is.mac()`, `is.windows()` etc., which can be useful for more granular environment-specific logic. This makes electron-is a bit more versatile compared to is-electron, which focuses solely on detecting the Electron environment.
While primarily a utility library for Electron, electron-util includes functionality to check if the environment is Electron. It also provides a wide range of other utilities like `electronUtil.is.macos()`, `electronUtil.is.linux()`, and `electronUtil.is.windows()` which are helpful for more comprehensive environment checks and other Electron-specific utilities, making it broader in scope compared to is-electron.
FAQs
Detect if running in Electron.
The npm package is-electron receives a total of 5,847,877 weekly downloads. As such, is-electron popularity was classified as popular.
We found that is-electron demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.