Skip to content

kyoz/npm-current-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-current-user

Get current npm user info

Build Status NPM version XO code style

Install

$ npm install npm-current-user

Usage

const npmCurrentUser = require('npm-current-user');

npmCurrentUser().then(info=> {
  console.log(info);
});

/* Results:

{ 
  name: 'banminkyoz',
  avatar: 'https://gravatar.com/avatar/64b58245e1cfd5fabd85297a1d5e3ab8?size=496',
  email: 'banminkyoz@gmail.com',
  github: 'banminkyoz',
  twitter: null 
  }

*/

Result will be null if you aren't logging to npm

Cli

$ npm-current-user

name:    banminkyoz,
avatar:  https://gravatar.com/avatar/64b58245e1cfd5fabd85297a1d5e3ab8?size=496,
email:   banminkyoz@gmail.com,
github:  banminkyoz,
twitter: null

Related

  • npm-whoami - Finds the npm username of the logged in npm user.
  • npm-user - Get user info of an npm user by username

License

MIT © Kyoz

About

Get current npm user info

Resources

License

Stars

Watchers

Forks

Packages

No packages published