How sindresorhus/is-root works
is-root is a tiny Node.js utility that answers whether the current process is running as the root user. Its workflow is a caller invoking the exported function, which checks whether process.getuid exists and, when available, whether it returns 0. The type declaration describes that boolean result. The implementation and README support this narrow scope; no broader product subsystems are indicated.
Main entry points: index.js Root check
Components 4
Runtime check
- Root check
index.js - Process UID
- Type declaration
index.d.ts
Other components
- Calling process
Connections 3
- Calling process → Root check: calls
readme.md - Root check → Process UID: checks UID
index.js - Root check → Calling process: returns boolean
index.js