Comparing version 2.1.0 to 2.2.0
@@ -8,3 +8,9 @@ 'use strict'; | ||
const env = process.env; | ||
return env.SUDO_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME; | ||
return env.SUDO_USER || | ||
env.C9_USER /* Cloud9 */ || | ||
env.LOGNAME || | ||
env.USER || | ||
env.LNAME || | ||
env.USERNAME; | ||
} | ||
@@ -11,0 +17,0 @@ |
{ | ||
"name": "username", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Get the username of the current user", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -27,3 +27,3 @@ # username [![Build Status](https://travis-ci.org/sindresorhus/username.svg?branch=master)](https://travis-ci.org/sindresorhus/username) | ||
First tries to get the username from the `SUDO_USER` LOGNAME` `USER` `LNAME` `USERNAME` environment variables. Then falls back to `$ id -un` on OS X / Linux and `$ whoami` on Windows, in the rare case none of the environment variables are set. The result is cached. | ||
First tries to get the username from the `SUDO_USER` `LOGNAME` `USER` `LNAME` `USERNAME` environment variables. Then falls back to `$ id -un` on OS X / Linux and `$ whoami` on Windows, in the rare case none of the environment variables are set. The result is cached. | ||
@@ -30,0 +30,0 @@ ### username() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4096
43