# is-elevated

> Check if the process is running with elevated privileges

Latest version **4.0.0** (published 2021-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-elevated
pnpm add is-elevated
yarn add is-elevated
bun add is-elevated
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-08-11 |
| First published | 2015-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/is-elevated) |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 44 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | admin, administrator, win32, windows, process, running, cmd, shell, command-line, check, detect, is, root, sudo, elevate, elevated, privileges |

## Links

- npm: https://www.npmjs.com/package/is-elevated
- Repository: https://github.com/sindresorhus/is-elevated
- Homepage: https://github.com/sindresorhus/is-elevated#readme
- Issues: https://github.com/sindresorhus/is-elevated/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-elevated

## Dependencies (2)

- [is-root](https://npm.io/package/is-root.md) ^3.0.0
- [is-admin](https://npm.io/package/is-admin.md) ^4.0.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-08-11
- 3.0.0 — 2019-04-19
- 2.0.1 — 2017-03-15
- 2.0.0 — 2017-03-15
- 1.0.0 — 2015-05-02

## README

# is-elevated

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

## Install

```
$ npm install is-elevated
```

## Usage

```js
import isElevated from 'is-elevated';

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

## Related

- [sudo-block](https://github.com/sindresorhus/sudo-block) - Block users from running your app with root permissions

---
_Source: https://npm.io/package/is-elevated · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
