|
|
há 2 meses atrás | |
|---|---|---|
| .. | ||
| index.d.ts | há 2 meses atrás | |
| index.js | há 2 meses atrás | |
| license | há 2 meses atrás | |
| package.json | há 2 meses atrás | |
| readme.md | há 2 meses atrás | |
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