@cjser/is-elevated
v4.0.0-cjser.2
Published
Check if the process is running with elevated privileges
Maintainers
Readme
is-elevated
Check if the process is running with elevated privileges
By checking if the process is root on Unix systems or if the user is administrator on Windows.
Keep in mind that root and Administrator mean different things so this module might not be suitable for your use-case.
Install
$ npm install is-elevatedUsage
import isElevated from 'is-elevated';
console.log(await isElevated());
//=> falseRelated
- sudo-block - Block users from running your app with root permissions
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-elevated
