Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

username

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

username - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

8

index.js

@@ -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 @@

2

package.json
{
"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()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc