1.0.1 • Published 9 years ago

find-npm-by-github v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

find-npm-by-github

WindowsMac/Linux
Windows Build statusBuild Status

Find the npm user name of a github name.

var find = require('find-npm-by-github')

find([githubtoken,] githubname, function (err, name) {
  if(err) throw(err)
  console.log(name) // likely name
})

It does so right now by fetching the javascript repos of the user, looking at the package.json files for the module name. Going to npm to look up the collaborators for those packages. Return the most often found collaborator.

The githubtoken can be crated here and allows you to not reach the rate limit that fast.

Possibilities to improve this module:

  1. Most people have the same name on npm, look this up first
  2. Compare npm email to github email, if this matches we found the right person
  3. Paginate through all the repos of the users in case there is no package.json found