# macos-release

> Get the name and version of a macOS release from the Darwin version

Latest version **3.5.1** (published 2026-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install macos-release
pnpm add macos-release
yarn add macos-release
bun add macos-release
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.5.1 |
| Published | 2026-06-08 |
| First published | 2016-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 68 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | macos, os, darwin, operating, system, platform, name, title, release, version |

## Links

- npm: https://www.npmjs.com/package/macos-release
- Repository: https://github.com/sindresorhus/macos-release
- Homepage: https://github.com/sindresorhus/macos-release#readme
- Issues: https://github.com/sindresorhus/macos-release/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/macos-release

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 3.5.1 (latest) — 2026-06-08
- 2.5.1 (version-2) — 2023-02-23
- 3.5.0 — 2026-06-08
- 3.4.0 — 2025-06-11
- 3.3.0 — 2024-07-31
- 3.2.0 — 2023-06-06
- 3.1.0 — 2022-06-07
- 3.0.1 — 2021-09-01
- 3.0.0 — 2021-08-12
- 2.5.0 — 2021-06-08
- 2.4.1 — 2020-07-22
- 2.4.0 — 2020-06-30
- 2.3.0 — 2019-06-10
- 2.2.0 — 2019-03-31
- 2.1.0 — 2019-03-17
- … 3 more at https://npm.io/package/macos-release/versions

## README

# macos-release

> Get the name and version of a macOS release from the Darwin version\
> Example: `13.2.0` → `{name: 'Mavericks', version: '10.9'}`

## Install

```sh
npm install macos-release
```

## Usage

```js
import os from 'node:os';
import macosRelease from 'macos-release';

// On a macOS Sierra system

macosRelease();
//=> {name: 'Sierra', version: '10.12'}

os.release();
//=> 13.2.0
// This is the Darwin kernel version

macosRelease(os.release());
//=> {name: 'Sierra', version: '10.12'}

macosRelease('14.0.0');
//=> {name: 'Yosemite', version: '10.10'}

macosRelease('20.0.0');
//=> {name: 'Big Sur', version: '11'}
```

## API

### macosRelease(release?)

#### release

Type: `string`

By default, the current operating system is used, but you can supply a custom [Darwin kernel version](https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).

## Related

- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system. Example: `macOS Sierra`
- [macos-version](https://github.com/sindresorhus/macos-version) - Get the macOS version of the current system. Example: `10.9.3`
- [windows-release](https://github.com/sindresorhus/windows-release) - Get the name of a Windows version from the release number: `5.1.2600` → `XP`

---
_Source: https://npm.io/package/macos-release · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
