Check if the process is running as administrator on Windows
$ npm install is-admin
import isAdmin from 'is-admin';
console.log(await isAdmin());
//=> false
Returns a Promise<boolean>
indicating whether the process is running as administrator.
- is-elevated - Check if the process is running with elevated privileges (cross-platform)