Socket
Socket
Sign inDemoInstall

fullname

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fullname - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

21

index.js

@@ -8,11 +8,18 @@ 'use strict';

const pTry = require('p-try');
const filterObj = require('filter-obj');
const envVars = [
'GIT_AUTHOR_NAME',
'GIT_COMMITTER_NAME',
'HGUSER', // Mercurial
'C9_USER' // Cloud9
];
function checkEnv() {
return pTry(() => {
const env = process.env;
const fullname = env.GIT_AUTHOR_NAME ||
env.GIT_COMMITTER_NAME ||
env.HGUSER || // Mercurial
env.C9_USER; // Cloud9
const varName = envVars.find(x => env[x]);
const fullname = varName && env[varName];
return fullname || Promise.reject();

@@ -79,2 +86,6 @@ });

module.exports = mem(getFullName);
module.exports = mem(getFullName, {
cacheKey() {
return JSON.stringify(filterObj(process.env, envVars));
}
});
{
"name": "fullname",
"version": "3.2.0",
"version": "3.3.0",
"description": "Get the fullname of the current user",

@@ -37,3 +37,4 @@ "license": "MIT",

"dependencies": {
"execa": "^0.4.0",
"execa": "^0.6.0",
"filter-obj": "^1.1.0",
"mem": "^1.1.0",

@@ -40,0 +41,0 @@ "p-any": "^1.0.0",

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