Get user info of a npm user
Since npm has no API for this we're forced to scrape the profile page.
Use the faster npm-email if you only need the email.
$ npm install --save npm-user
var npmUser = require('npm-user');
npmUser('sindresorhus', function (err, user) {
console.log(user);
/*
{
name: 'Sindre Sorhus',
email: 'sindresorhus@gmail.com',
homepage: 'http://sindresorhus.com',
github: 'sindresorhus',
twitter: 'sindresorhus',
freenode: 'sindresorhus'
}
*/
});
Values will be null
if they're not set in the npm profile.
$ npm install --global npm-user
$ npm-user --help
Usage
$ npm-user <username>
Example
$ npm-user sindresorhus
Name: Sindre Sorhus
Email: sindresorhus@gmail.com
Homepage: http://sindresorhus.com
Twitter: sindresorhus
GitHub: sindresorhus
Freenode: sindresorhus
- npm-email - Get the email of a npm user
- npm-keyword - Get a list of npm packages with a certain keyword
- package-json - Get the package.json of a package from the npm registry
MIT © Sindre Sorhus