# elevationinfo

> Checks if the process is running as root or admin

Latest version **1.0.2** (published 2018-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install elevationinfo
pnpm add elevationinfo
yarn add elevationinfo
bun add elevationinfo
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-02-05 |
| First published | 2018-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lufinkey |
| Maintainers | lufinkey |

## Links

- npm: https://www.npmjs.com/package/elevationinfo
- npm.io page: https://npm.io/package/elevationinfo

## Recent versions

- 1.0.2 (latest) — 2018-02-05
- 1.0.1 — 2018-02-04
- 1.0.0 — 2018-02-04

## README

# elevationinfo

Provides methods to check if user is running as root (on *Linux* and *Mac*), or admin (on *Windows*).

## Install

```bash
npm install --save elevationinfo
```

## API

```javascript
const elevationinfo = require('elevationinfo');
```

* **elevationinfo.isRoot**
	(*Linux*/*Mac*) Checks if the process is running as the root user.
	* **returns** *true* if root, or *false* if not root.


* **elevationinfo.isRootAsync**
	(*Linux*/*Mac*) Checks if the process is running as the root user, asynchronously.
	* **returns** a Promise that resolves to a *true* if root or *false* if not root.


* **elevationinfo.isAdmin**
	(*Windows*) Checks if the process is running with administrative privileges.
	* **returns** *true* if the process has admin privileges, or *false* if it does not.


* **elevationinfo.isAdminAsync**
	(*Windows*) Checks if the process is running with administrative privileges, asynchronously.
	* **returns** a Promise that resolves to *true* if the process has admin privileges, or *false* if it does not.


* **elevationinfo.isElevated**
	Checks if the process is running with elevated privileges.
	* **returns** same as **isRoot** on Linux and Mac, and **isAdmin** on Windows

* **elevationinfo.isElevatedAsync**
	Checks if the process is running with elevated privileges, asynchronously.
	* **returns** same as **isRootAsync** on Linux and Mac, and **isAdminAsync** on Windows

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