|
9 years ago | |
---|---|---|
.. | ||
index.js | 9 years ago | |
package.json | 9 years ago | |
readme.md | 9 years ago |
Check if the process is running as root user, eg. started with
sudo
.
$ npm install --save is-root
$ sudo node index.js
// index.js
var isRoot = require('is-root');
isRoot();
//=> true
MIT © Sindre Sorhus