which-runtime

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

Apache-2.0 9 个版本
安装
npm install which-runtime
yarn add which-runtime
pnpm add which-runtime
bun add which-runtime
README

which-runtime

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

npm install which-runtime

Usage

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

版本列表
1.4.0 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