8000 GitHub - sindresorhus/is-elevated: Check if the process is running with elevated privileges
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sindresorhus/is-elevated

Repository files navigation

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

About

Check if the process is running with elevated privileges

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0