1.1.5 • Published 11 months ago

elevated v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

elevated

Check if script is executed in an elevated mode :

  • Using SUDO on Linux.
  • From an administrator account on Windows.

No support for other platforms like MacOS with this version but I'm opened to pull requests.

Installation

NPM

npm install -s elevated

Yarn

yarn add elevated

Usage examples

elevated.check()

console.log(
  require('elevated').check() ? 'elevated' : 'unelevated'
);

elevated.required()

This way an exception is thrown with a platform specific message if the runtime is not elevated.

require('elevated').required();
1.1.5

11 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

10 years ago