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 0.1.1 to 1.0.0

23

cli.js
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var pkg = require('./package.json');
var getUsername = require('./index');
var input = process.argv[2];
var username = require('./');
var argv = process.argv.slice(2);
function help() {
console.log(pkg.description);
console.log('');
console.log('Usage');
console.log(' $ username');
console.log(' sindresorhus');
console.log([
'',
' ' + pkg.description,
'',
' Usage',
' username'
].join('\n'));
}
if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) {
if (argv.indexOf('--help') !== -1) {
help();

@@ -21,3 +22,3 @@ return;

if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) {
if (argv.indexOf('--version') !== -1) {
console.log(pkg.version);

@@ -27,4 +28,4 @@ return;

getUsername(function (err, username) {
username(function (err, username) {
console.log(username);
});
{
"name": "username",
"version": "0.1.1",
"version": "1.0.0",
"description": "Get the username of the current user",
"license": "MIT",
"repository": "sindresorhus/username",
"bin": {
"username": "cli.js"
},
"author": {

@@ -15,2 +12,5 @@ "name": "Sindre Sorhus",

},
"bin": {
"username": "cli.js"
},
"engines": {

@@ -17,0 +17,0 @@ "node": ">=0.10.0"

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

```bash
```sh
$ npm install --save username

@@ -46,21 +46,21 @@ ```

You can also use it as a CLI app by installing it globally:
```bash
```sh
$ npm install --global username
```
#### Usage
```bash
```sh
$ username --help
Usage
$ username
sindresorhus
Usage
username
```
## Related
- [fullname](https://github.com/sindresorhus/fullname) - Get the fullname of the current user
## License
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](http://sindresorhus.com)
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