Check if the process is running with elevated privileges
Keep in mind that
Administrator mean different things so this module might not be suitable for your use-case.
$ npm install is-elevated
import isElevated from 'is-elevated'; console.log(await isElevated()); //=> false
- sudo-block - Block users from running your app with root permissions