sindresorhus/electron-util
sindresorhus/electron-util has 1,335 GitHub stars and 65 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-06 09:28 UTC. Last push 2025-09-09.
Useful utilities for Electron apps and modules
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalelectron-util
Useful utilities for Electron apps and modules
You can use this package directly in both the main and renderer process.
This package is organized into three parts:
shared- APIs that work in both the main and renderer processmain- APIs that only work in the main process (requires Electron APIs)node- APIs that work in any Node.js environment, even outside Electron (pure Node.js utilities for detecting Electron environment, ASAR usage, etc.)
To use features from the "main" part in the renderer process, you will need to set up IPC channels.
Install
npm install electron-util
[!NOTE] Requires Electron 37 or later.
Usage
The “shared” API you can access directly:
import {is} from 'electron-util';
console.log(is.macos && is.main);
//=> true
For the “main” API, use the /main sub-export:
import {isDev} from 'electron-util/main';
console.log(isDev);
//=> false
For the “node” API, use the /node sub-export:
import {isElectron, fixPathForAsarUnpack} from 'electron-util/node';
console.log(isElectron);
//=> true when running in Electron, false in plain Node.js
const fixedPath = fixPathForAsarUnpack('/path/app.asar/binary');
//=> '/path/app.asar.unpacked/binary' when in ASAR, or unchanged otherwise
API
Documentation (The service is broken)
Look at the types for now.
Related
- electron-store - Save and load data like user preferences, app state, cache, etc
- electron-debug - Adds useful debug features to your Electron app
- electron-context-menu - Context menu for your Electron app
- electron-dl - Simplified file downloads for your Electron app
- electron-unhandled - Catch unhandled errors and promise rejections in your Electron app
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,435 starspublic-apis/public-apis
A collective list of free APIs
496,755 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
437,950 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,067 stars