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

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 1.1.0 to 1.1.1

35

cli.js
#!/usr/bin/env node
'use strict';
var pkg = require('./package.json');
var meow = require('meow');
var fullname = require('./');
var argv = process.argv.slice(2);
function help() {
console.log([
'',
' ' + pkg.description,
'',
' Example',
' fullname',
' Sindre Sorhus'
].join('\n'));
}
meow({
help: [
'Example',
' $ fullname',
' Sindre Sorhus'
]
});
if (argv.indexOf('--help') !== -1) {
help();
return;
}
fullname(function (err, name) {
if (err) {
console.error(err.message);
process.exit(1);
}
if (argv.indexOf('--version') !== -1) {
console.log(pkg.version);
return;
}
fullname(function (err, name) {
console.log(name);
});

@@ -84,3 +84,3 @@ 'use strict';

exec('getent passwd $(whoami)', function (err, stdout) {
fullname = stdout.trim().split(':')[4].replace(/,.*/, '');
fullname = (stdout.trim().split(':')[4] || '').replace(/,.*/, '');

@@ -87,0 +87,0 @@ if (err || !fullname) {

{
"name": "fullname",
"version": "1.1.0",
"version": "1.1.1",
"description": "Get the fullname of the current user",

@@ -10,7 +10,5 @@ "license": "MIT",

"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
"url": "sindresorhus.com"
},
"bin": {
"fullname": "cli.js"
},
"bin": "cli.js",
"engines": {

@@ -27,2 +25,3 @@ "node": ">=0.10.0"

"keywords": [
"cli-app",
"cli",

@@ -46,2 +45,3 @@ "bin",

"dependencies": {
"meow": "^3.3.0",
"npmconf": "^2.1.1"

@@ -48,0 +48,0 @@ },

@@ -39,3 +39,3 @@ # fullname [![Build Status](https://travis-ci.org/sindresorhus/fullname.svg?branch=master)](https://travis-ci.org/sindresorhus/fullname)

Example
fullname
$ fullname
Sindre Sorhus

@@ -42,0 +42,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