Irina Glushko 2389e7160b HW1 done | 3 years ago | |
---|---|---|
.. | ||
index.d.ts | 3 years ago | |
index.js | 3 years ago | |
license | 3 years ago | |
package.json | 3 years ago | |
readme.md | 3 years ago |
Check if the process is running as root user, for example, one started with
sudo
$ npm install is-root
$ sudo node index.js
// index.js
const isRoot = require('is-root');
isRoot();
//=> true
MIT © Sindre Sorhus