JSPM

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

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

Install

$ npm install --save npm-user

Usage

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.

CLI

$ 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

License

MIT © Sindre Sorhus