
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
Detect the current JavaScript runtime environment
npm install is-runtime
import detectRuntime, {isNode, isBun, isDeno} from 'is-runtime';
detectRuntime();
//=> 'node'
isNode;
//=> true
isBun;
//=> false
Returns a string identifying the current runtime: 'node' | 'bun' | 'deno' | 'browser' | 'cloudflare-workers' | 'service-worker' | 'edge-light' | 'unknown'.
Detection order (first match wins): bun, deno, edge-light, cloudflare-workers, service-worker, node, browser, unknown.
Type: boolean
Whether the current runtime is Bun.
Type: boolean
Whether the current runtime is Deno.
Type: boolean
Whether the current runtime is Node.js.
Type: boolean
Whether the current runtime is Vercel Edge Light.
Type: boolean
Whether the current runtime is Cloudflare Workers.
Type: boolean
Whether the current runtime is a Service Worker.
Type: boolean
Whether the current runtime is a browser.
MIT
FAQs
Detect the current JavaScript runtime environment
The npm package is-runtime receives a total of 1 weekly downloads. As such, is-runtime popularity was classified as not popular.
We found that is-runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.