{"id":696,"url":"https://github.com/sindresorhus/os-name","last_synced_at":"2025-05-16T06:02:23.890Z","repository":{"id":17752943,"uuid":"20604616","full_name":"sindresorhus/os-name","owner":"sindresorhus","description":"Get the name of the current operating system. Example: macOS Sierra","archived":false,"fork":false,"pushed_at":"2024-06-10T13:56:51.000Z","size":28,"stargazers_count":145,"open_issues_count":1,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-11T19:23:26.321Z","etag":null,"topics":[],"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/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":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","buy_me_a_coffee":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2014-06-07T22:51:51.000Z","updated_at":"2024-12-10T22:43:07.000Z","dependencies_parsed_at":"2024-02-22T18:03:35.017Z","dependency_job_id":"894e67cb-a04f-489b-ac20-d0c55fa6fc39","html_url":"https://github.com/sindresorhus/os-name","commit_stats":{"total_commits":49,"total_committers":9,"mean_commits":5.444444444444445,"dds":"0.16326530612244894","last_synced_commit":"40044d3305893c9551e468a7a06694956d3d1804"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fos-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/os-name/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254467573,"owners_count":22076114,"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":[],"created_at":"2024-01-05T20:15:29.061Z","updated_at":"2025-05-16T06:02:23.791Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://buymeacoffee.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["Repository","Libraries"],"sub_categories":["OS Identification","OS identification"],"readme":"# os-name\n\n\u003e Get the name of the current operating system\\\n\u003e Example: `macOS Sierra`\n\nUseful for analytics and debugging.\n\n## Install\n\n```sh\nnpm install os-name\n```\n\n## Usage\n\n```js\nimport os from 'node:os';\nimport osName from 'os-name';\n\n// On a macOS Sierra system\n\nosName();\n//=\u003e 'macOS Sierra'\n\nosName(os.platform(), os.release());\n//=\u003e 'macOS Sierra'\n\nosName('darwin', '14.0.0');\n//=\u003e 'OS X Yosemite'\n\nosName('linux', '3.13.0-24-generic');\n//=\u003e 'Linux 3.13'\n\nosName('win32', '6.3.9600');\n//=\u003e 'Windows 8.1'\n```\n\n## API\n\n### osName(platform?, release?)\n\nBy default, the name of the current operating system is returned.\n\nYou can optionally supply a custom [`os.platform()`](https://nodejs.org/api/os.html#os_os_platform) and [`os.release()`](https://nodejs.org/api/os.html#os_os_release).\n\nCheck out [`getos`](https://github.com/wblankenship/getos) if you need the Linux distribution name.\n\n## Related\n\n- [os-name-cli](https://github.com/sindresorhus/os-name-cli) - CLI for this module\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fos-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fos-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fos-name/lists"}