This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/client/node_modules/is-root
2025-06-13 14:04:40 +08:00
..
index.d.ts Initial commit 2025-06-13 14:04:40 +08:00
index.js Initial commit 2025-06-13 14:04:40 +08:00
license Initial commit 2025-06-13 14:04:40 +08:00
package.json Initial commit 2025-06-13 14:04:40 +08:00
readme.md Initial commit 2025-06-13 14:04:40 +08:00

is-root Build Status

Check if the process is running as root user, for example, one started with sudo

Install

$ npm install is-root

Usage

$ sudo node index.js
// index.js
const isRoot = require('is-root');

isRoot();
//=> true
  • is-elevated - Check if the process is running with elevated privileges (cross-platform)

License

MIT © Sindre Sorhus