@thinice/is-node
v0.1.4
Published
Distinguishes Node vs browser vs edge-ish runtime
Downloads
452
Readme
@thinice/is-node
Detects if running in Node.js (checks process.versions.node).
Installation
npm install @thinice/is-nodeUsage
import { isNode } from "@thinice/is-node";
if (isNode()) {
// Node.js or Bun
} else {
// Browser, Deno, Cloudflare Workers, etc.
}Source
https://github.com/thinicejs/utils/tree/main/packages/is-node
