JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8830
  • Score
    100M100P100Q138039F
  • License MIT

Get user info of an npm user

Package Exports

  • npm-user

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-user) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm-user Build Status

Get user info of an 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.

Install

$ npm install npm-user

Usage

const npmUser = require('npm-user');

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

Values will be null if they're not set in the npm profile.

License

MIT © Sindre Sorhus