process
Lightweight browser polyfill for Node.js's process global, used by bundlers for isomorphic code
Repository Health
Technical Analysis
process is a minimal shim that lets code written against Node.js’s built-in process global run unmodified in a browser bundle. In Node, require('process') simply re-exports the real global.process; in the browser, a lean browser.js implementation supplies just enough of the API — process.nextTick, process.env, process.argv, process.browser, and safe setTimeout/clearTimeout-backed timer fallbacks — for isomorphic libraries to keep working without a full process emulation layer.
It deliberately does not attempt to be a complete polyfill: its README explicitly scopes it to nextTick and little more, pointing users toward separate community shims (browser-process-hrtime, browser-stdout) for anything beyond that. Because bundlers like Browserify and Webpack automatically substitute this package whenever they detect code referencing the process global, it ends up bundled into a huge share of the JavaScript ecosystem’s browser builds without most developers ever installing it directly — reflected in its roughly 50 million weekly downloads against a comparatively small, rarely-updated codebase.
What You Get
- In Node: a one-line passthrough (
module.exports = global.process) that re-exports the real process object - In browsers: a
browser.jsshim providingprocess.nextTick,process.title,process.browser,process.env, andprocess.argv - Defensive
setTimeout/clearTimeoutwrapping that degrades gracefully across sandboxed or non-standard JS environments - A
browserfield in package.json so Browserify/Webpack automatically substitute the shim in browser builds - A deliberately minimal surface, keeping bundle size small since it’s implicitly pulled into countless browser bundles
Common Use Cases
- Running an npm package written against Node’s
processglobal (e.g. checkingprocess.env.NODE_ENV) inside a Browserify or Webpack bundle - Detecting whether isomorphic code is executing in a browser via
process.browser - Deferring work with
process.nextTickin a library that targets both Node and browser environments - Acting as the implicit dependency bundlers inject automatically when they detect
processusage in a dependency graph
Under The Hood
Architecture - The package is intentionally two files: index.js is a single line that re-exports Node’s real global.process for Node environments, while browser.js (184 lines) is the actual polyfill logic used when bundled for browsers, selected automatically via the browser field in package.json that tools like Browserify and Webpack understand. browser.js implements nextTick via a queue drained via setTimeout, with defensive try/catch wrapping around cached setTimeout/clearTimeout references to survive being run inside sandboxed evals, stubbed test runners, or strict-mode contexts where globals may not resolve normally. Tech Stack - Zero dependencies, plain ES5 JavaScript for maximum compatibility with older bundlers and browsers; tests run via Mocha (test.js) and, per package.json, previously via zuul for cross-browser test execution. Code Quality - The codebase is deliberately tiny and has changed very little since it stabilized around 2016 (activity_status: inactive, last commit 2020), which for a shim whose entire contract is ‘don’t crash when process is referenced’ is a sign of stability rather than neglect — the API surface it needs to cover hasn’t changed. The README explicitly documents scope boundaries (only nextTick and a few fields; hrtime/stdout are separate packages), which is good practice for keeping a widely-transitively-depended-on shim minimal. API Design - There is effectively no API to learn: consumers never import this package directly by design — it exists purely so bundlers can silently substitute it when code references the ambient process global, making its ‘API’ the same as Node’s native process object for the handful of properties it implements.
Used by 21 apps in this directory
Logseq
Knowledge Management · Note Taking
A privacy-first, open-source knowledge graph platform combining Markdown, Org-mode, bidirectional linking, and local-first storage for building your second brain.
Magic
AI Agents · Automation · Low Code Platforms
Magic is an enterprise-grade open-source AI agent platform combining a generalist AI agent, workflow engine, IM, and collaborative office system for running an AI-powered digital workforce.
Mattermost
Collaboration · Devops · Team Chat
Open core, self-hosted team collaboration with chat, AI agents, voice calling, and deep DevOps integrations — all under your control.
Mautic
Automation · Ecommerce · Marketing
The world's largest open source marketing automation platform — own your data, run multi-channel campaigns, and escape vendor lock-in forever.
Metabase
Analytics
The open-source BI platform that lets anyone ask questions and build dashboards without writing SQL — with an embedded analytics SDK and AI-powered query assistant included.
Novu
Developer Tools
Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.
OpenSign
Digital Signiture
Self-host a full-featured DocuSign alternative with unlimited e-signatures, multi-signer workflows, and cryptographic PDF signing.
Ory Kratos
Authentication
API-first identity and user management that handles login, registration, MFA, and recovery so your application never has to.
Redash
Analytics · Data Engineering
Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.