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

Package detail

conjecture

boneskull294Apache-2.00.1.2

Guess Git author, email address, GitHub username, etc.

git, github, guess, username, email, author

readme

conjecture

Guess Git author, email address, GitHub username, etc.

This module attempts to gather info from various Git config files, npm, and the host system.

Requirements

  • Node.js v4 or greater

Install

$ npm install conjecture --save

Example

// each function returns a Promise
const {guessAuthor, guessEmail, guessGitHubUsername} = require('conjecture');

// guessGitHubUsername takes an optional "email" parameter
Promise.all([guessAuthor(), guessEmail(), guessGitHubUsername()])
  .then(([author, email, githubUsername]) => {
    console.log(author); // Christopher Hiller
    console.log(email); // boneskull@boneskull.com
    console.log(githubUsername); // boneskull  
  });

License

© 2017 Christopher Hiller. Licensed Apache-2.0.