Skip to content

pkgstats/npm-user

 
 

Repository files navigation

npm-user

Get user info of an npm user

Since npm has no API for this, we are forced to scrape the profile page.

Use the faster npm-email package if you only need the email.

Install

npm install npm-user

Usage

import npmUser from 'npm-user';

console.log(await npmUser('sindresorhus'));
/*
{
	name: 'Sindre Sorhus',
	avatar: 'https://gravatar.com/avatar/d36a92237c75c5337c17b60d90686bf9?size=496',
	email: 'sindresorhus@gmail.com'
}
*/

The values will be undefined if they're not set in the npm profile.

Related

About

Get user info of an npm user

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 77.6%
  • TypeScript 22.4%