is-elevated
Version:
Check if the process is running with elevated privileges
27 lines (16 loc) • 662 B
Markdown
> Check if the process is running with elevated privileges
By checking if the process [is root](https://github.com/sindresorhus/is-root) on Unix systems or if the user is [administrator](https://github.com/sindresorhus/is-admin) on Windows.
Keep in mind that `root` and `Administrator` mean different things so this module might not be suitable for your use-case.
```
$ npm install is-elevated
```
```js
import isElevated from 'is-elevated';
console.log(await isElevated());
//=> false
```
- [sudo-block](https://github.com/sindresorhus/sudo-block) - Block users from running your app with root permissions