@cjser/is-root
v3.0.0-cjser.2
Published
Check if the process is running as root user, for example, one started with `sudo`
Maintainers
Readme
is-root
Check if the process is running as root user, for example, one started with
sudo
Install
$ npm install is-rootUsage
$ sudo node index.js// index.js
import isRoot from 'is-root';
isRoot();
//=> trueRelated
- is-elevated - Check if the process is running with elevated privileges (cross-platform)
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/is-root
