0.1.2 • Published 6 years ago

npm-current-user v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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