# which-runtime

> Detect if you are in Bare or Node and which os etc

Latest version **1.4.0** (published 2026-05-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install which-runtime
pnpm add which-runtime
yarn add which-runtime
bun add which-runtime
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2026-05-20 |
| First published | 2024-02-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Holepunch Inc. |
| Maintainers | mafintosh, davidmarkclements |

## Links

- npm: https://www.npmjs.com/package/which-runtime
- Repository: https://github.com/holepunchto/which-runtime
- Issues: https://github.com/holepunchto/which-runtime/issues
- npm.io page: https://npm.io/package/which-runtime

## Recent versions

- 1.4.0 (latest) — 2026-05-20
- 1.3.2 — 2025-09-09
- 1.3.1 — 2025-08-30
- 1.3.0 — 2025-05-23
- 1.2.1 — 2024-08-14
- 1.2.0 — 2024-02-19
- 1.1.0 — 2024-02-19
- 1.0.0 — 2024-02-19
- 0.0.0 — 2024-02-19

## README

# which-runtime

Detect if you are in Bare or Node and which os etc

```
npm install which-runtime
```

## Usage

```js
import {
  runtime, // bare, node, or browser
  platform, // the platform string, ie darwin, win32, etc
  arch, // which arch, arm64, ia32, x64 etc
  isBrowser,
  isBare,
  isNode,
  isLinux,
  isWindows,
  isMac,
  isIOS,
  isAndroid
} from 'which-runtime'
```

## License

Apache-2.0

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