zhibo/live-streaming/client/node_modules/is-root
2025-12-15 11:34:49 +08:00
..
index.d.ts 初始化 2025-12-15 11:34:49 +08:00
index.js 初始化 2025-12-15 11:34:49 +08:00
license 初始化 2025-12-15 11:34:49 +08:00
package.json 初始化 2025-12-15 11:34:49 +08:00
readme.md 初始化 2025-12-15 11:34:49 +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