{"id":13406467,"url":"https://github.com/sindresorhus/electron-util","last_synced_at":"2025-05-14T19:01:50.071Z","repository":{"id":21291955,"uuid":"92142747","full_name":"sindresorhus/electron-util","owner":"sindresorhus","description":"Useful utilities for Electron apps and modules","archived":false,"fork":false,"pushed_at":"2024-02-26T17:01:32.000Z","size":231,"stargazers_count":1301,"open_issues_count":5,"forks_count":64,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-07T10:28:09.719Z","etag":null,"topics":["electron","electron-module","nodejs","npm-package"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2017-05-23T07:28:03.000Z","updated_at":"2025-05-07T02:52:38.000Z","dependencies_parsed_at":"2024-03-02T03:09:48.021Z","dependency_job_id":"d5475533-66de-495a-b9f6-be21db6452c8","html_url":"https://github.com/sindresorhus/electron-util","commit_stats":{"total_commits":117,"total_committers":22,"mean_commits":5.318181818181818,"dds":"0.20512820512820518","last_synced_commit":"5ea6f12e54efb66685e4ed213c3b8365fde99e69"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Felectron-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Felectron-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Felectron-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Felectron-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/electron-util/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253627169,"owners_count":21938453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","electron-module","nodejs","npm-package"],"created_at":"2024-07-30T19:02:31.022Z","updated_at":"2025-05-14T19:01:49.901Z","avatar_url":"https://github.com/sindresorhus.png","language":"TypeScript","readme":"# electron-util\n\n\u003e Useful utilities for Electron apps and modules\n\nYou can use this package directly in both the [main and renderer process](https://www.electronjs.org/docs/latest/tutorial/quick-start/#main-process).\n\nThere are three parts of this package, “shared”, “main”, and “node”. The “shared” part works in both the main or [rendered process](https://www.electronjs.org/docs/latest/tutorial/process-model#the-renderer-process). The “main” part works only in the [main process](https://www.electronjs.org/docs/latest/tutorial/quick-start/#run-the-main-process). The “node” part is for Node.js-only APIs (not Electron).\n\nTo use features from the “main” part in the renderer process, you will need to set up [IPC channels](https://www.electronjs.org/docs/latest/tutorial/ipc).\n\n## Install\n\n```sh\nnpm install electron-util\n```\n\n\u003e [!NOTE]\n\u003e Requires Electron 28 or later.\n\n## Usage\n\nThe “shared” API you can access directly:\n\n```ts\nimport {is} from 'electron-util';\n\nconsole.log(is.macos \u0026\u0026 is.main);\n//=\u003e true\n```\n\nFor the “main” API, use the `/main` sub-export:\n\n```ts\nimport {isDev} from 'electron-util/main';\n\nconsole.log(isDev);\n//=\u003e false\n```\n\n## API\n\n~~[Documentation](https://tsdocs.dev/docs/electron-util)~~ (The service is broken)\n\nLook at the [types](source) for now.\n\n## Related\n\n- [electron-store](https://github.com/sindresorhus/electron-store) - Save and load data like user preferences, app state, cache, etc\n- [electron-debug](https://github.com/sindresorhus/electron-debug) - Adds useful debug features to your Electron app\n- [electron-context-menu](https://github.com/sindresorhus/electron-context-menu) - Context menu for your Electron app\n- [electron-dl](https://github.com/sindresorhus/electron-dl) - Simplified file downloads for your Electron app\n- [electron-unhandled](https://github.com/sindresorhus/electron-unhandled) - Catch unhandled errors and promise rejections in your Electron app\n","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["TypeScript","JavaScript","Tools","Library","Electron"],"sub_categories":["For Electron","Uncategorized","React Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Felectron-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Felectron-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Felectron-util/lists"}