Detect the current JavaScript runtime
Used for telemetry/logging and platform layer selection. Checks for runtime-specific global objects in order of preference.
The detected runtime identifier
const runtime = detectRuntime();console.log(`Running on ${runtime}`); Copy
const runtime = detectRuntime();console.log(`Running on ${runtime}`);
Detect the current JavaScript runtime
Used for telemetry/logging and platform layer selection. Checks for runtime-specific global objects in order of preference.