is-elevated
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

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-elevated

Usage

import isElevated from 'is-elevated';

console.log(await isElevated());
//=> false

Related

  • sudo-block - Block users from running your app with root permissions

Package Sidebar

Install

npm i is-elevated

Weekly Downloads

13,884

Version

4.0.0

License

MIT

Unpacked Size

3.15 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus