npm-current-user

0.1.2 • Public • Published

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

Package Sidebar

Install

npm i npm-current-user

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

3.94 kB

Total Files

5

Last publish

Collaborators

  • banminkyoz