Get the username of the current user
$ npm install username
const username = ;;
First tries to get the username from the
USERNAME environment variables. Then falls back to
$ id -un on macOS / Linux and
$ whoami on Windows, in the rare case none of the environment variables are set. The result is cached.
Promise for the username.
Returns the username.
MIT © Sindre Sorhus