{"id":26481930,"url":"https://github.com/electron-utils/electron-platform","last_synced_at":"2025-03-20T03:36:19.089Z","repository":{"id":57221814,"uuid":"77398971","full_name":"electron-utils/electron-platform","owner":"electron-utils","description":"Platform detection for Electron, Web Browser and Node","archived":false,"fork":false,"pushed_at":"2017-03-09T06:44:16.000Z","size":12,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T05:38:22.157Z","etag":null,"topics":["electron","platform-detection"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/electron-utils.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}},"created_at":"2016-12-26T17:55:14.000Z","updated_at":"2025-01-10T14:30:44.000Z","dependencies_parsed_at":"2022-08-29T04:10:13.270Z","dependency_job_id":null,"html_url":"https://github.com/electron-utils/electron-platform","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-utils%2Felectron-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-utils%2Felectron-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-utils%2Felectron-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-utils%2Felectron-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron-utils","download_url":"https://codeload.github.com/electron-utils/electron-platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244545287,"owners_count":20469829,"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","platform-detection"],"created_at":"2025-03-20T03:36:18.551Z","updated_at":"2025-03-20T03:36:19.083Z","avatar_url":"https://github.com/electron-utils.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-platform\n\n[![Linux Build Status](https://travis-ci.org/electron-utils/electron-platform.svg?branch=master)](https://travis-ci.org/electron-utils/electron-platform)\n[![Windows Build status](https://ci.appveyor.com/api/projects/status/ym6vcqcpqmv3dd34?svg=true)](https://ci.appveyor.com/project/jwu/electron-platform)\n[![Dependency Status](https://david-dm.org/electron-utils/electron-platform.svg)](https://david-dm.org/electron-utils/electron-platform)\n[![devDependency Status](https://david-dm.org/electron-utils/electron-platform/dev-status.svg)](https://david-dm.org/electron-utils/electron-platform#info=devDependencies)\n\nPlatform detection for Electron and Web Browser.\n\n## Install\n\n```bash\nnpm install --save electron-platform\n```\n\n## Usage\n\n```javascript\nconst platform = require('electron-platform');\n\nif ( platform.isRendererProcess ) {\n  // do something\n}\n```\n\n## API Reference\n\n### Properties\n\n#### isNode\n\nIndicates whether executes in node.js application.\n\n#### isElectron\n\nIndicates whether executes in electron.\n\n#### isNative\n\nIndicates whether executes in native environment (compare to web-browser).\n\n#### isPureWeb\n\nIndicates whether executes in common web browser.\n\n#### isRendererProcess\n\nIndicates whether executes in common web browser, or editor's renderer process(web-page).\n\n#### isMainProcess\n\nIndicates whether executes in editor's main process.\n\n#### isDarwin\n\nIndicates whether executes in OSX.\n\n#### isWin32\n\nIndicates whether executes in Windows.\n\n#### isDev\n\nCheck if running in retina display.\nIf we are in renderer process and `nodeIntegration` is false, isDev will be undefined.\n\n#### isRetina\n\nCheck if running in retina display.\n\n## License\n\nMIT © 2017 Johnny Wu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-utils%2Felectron-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron-utils%2Felectron-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-utils%2Felectron-platform/lists"}