Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

npm-email

sindresorhus46.3kMIT5.1.0TypeScript support: included

Get the email of an npm user

npm, email, address, user, username, registry, json, get

readme

npm-email

Get the email of an npm user

Install

npm install npm-email

Usage

import npmEmail from 'npm-email';

console.log(await npmEmail('sindresorhus'));
//=> 'sindresorhus@gmail.com'

API

npmEmail(username)

Returns a promise for the user's email address, or undefined if the user does not exist or the email could not be found.

username

Type: string

The npm username to look up.