# gethubemail

> This is a simple node.js module that scans email addresses in commits and takes a guess as to what might be the user's main email.

Latest version **1.0.2** (published 2021-08-26) · Apache2.0 license · 0 weekly downloads

## Install

```sh
npm install gethubemail
pnpm add gethubemail
yarn add gethubemail
bun add gethubemail
```

Provides the command `gethubemail`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-08-26 |
| First published | 2021-08-26 |
| Weekly downloads | 0 |
| License | Apache2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Hai Liang Wang |
| Maintainers | chatopera |

## Links

- npm: https://www.npmjs.com/package/gethubemail
- Repository: https://github.com/hailiang-wang/node-gethubemail
- Homepage: https://github.com/hailiang-wang/node-gethubemail#readme
- Issues: https://github.com/hailiang-wang/node-gethubemail/issues
- npm.io page: https://npm.io/package/gethubemail

## Dependencies (2)

- [bluebird](https://npm.io/package/bluebird.md) ^2.9.13
- [request-promise](https://npm.io/package/request-promise.md) ^0.4.0

## Recent versions

- 1.0.2 (latest) — 2021-08-26
- 1.0.1 — 2021-08-26
- 1.0.0 — 2021-08-26

## README

# Find Github user emails

[https://www.npmjs.com/package/gethubemail](https://www.npmjs.com/package/gethubemail)

This is a simple node.js module that scans email addresses in commits and takes a guess as to what might be the user's main email.

It's based on [FindGitHubEmail](https://github.com/alpacaaa/node-findgithubemail) by [@alpacaaa](https://github.com/alpacaaa/node-findgithubemail). As noted there, it makes it easy to get in contact with open source developers. Please use it for good, not evil.

### Install

    npm install gethubemail

### Usage

```javascript
var gethubemail = require("gethubemail");

// optional, set auth info to promote Request Rate Limit
// https://stackoverflow.com/questions/13394077/is-there-a-way-to-increase-the-api-rate-limit-or-to-bypass-it-altogether-for-git
gethubemail.auth = {
  username: YOUR_GITHUB_USERNAME,
  password: YOUR_GITHUB_PERSONAL_TOKEN,
};
var username = "alpacaaa";

gethubemail.find(username).then(function (result) {
  console.log(result);
});

// {
//   best_guess: 'babbonatale@alpacaaa.net',
//   gravatar_match: true,
//   alternatives: []
// }
```

### Command line usage

You can install this module globally with the `-g` flag and use it from the command line.

    gethubemail alpacaaa

Or set the GITHUB_BASIC_AUTH with username and personal access token -

```
GITHUB_BASIC_AUTH=hailiang-wang:ghp_1Qu2Cxxx bin/cli.js alpacaaa
```

### Testing

    npm test

### License

[Apache2.0](./LICENSE)

---
_Source: https://npm.io/package/gethubemail · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
