lib/fetchAuthors.js
function fetchAuthors (forPackages, opts) {
  opts = normalizeOpts(opts)
  // start with npmUser and email from registry
  return fetchRegistry(forPackages, {}, opts)
    .then(persons => {
      // reduce duplicates and add pre-known aliases
      return reduceDuplicates(persons, opts)
    })
    .then(persons => {
      // add name, githubUser, and twitter from npm profile
      return fetchProfiles(persons, opts)
    })
    .then(persons => {
      // finish with name and email from github
      return fetchGithub(persons, opts)
    })
}
function fetchAuthors (forPackages, opts) {
  opts = normalizeOpts(opts)
  // start with npmUser and email from registry
  return fetchRegistry(forPackages, {}, opts)
    .then(persons => {
      // reduce duplicates and add pre-known aliases
      return reduceDuplicates(persons, opts)
    })
    .then(persons => {
      // add name, githubUser, and twitter from npm profile
      return fetchProfiles(persons, opts)
    })
    .then(persons => {
      // finish with name and email from github
      return fetchGithub(persons, opts)
    })
}
function fetchAuthors ( forPackages , opts ) { opts = normalizeOpts ( opts ) // start with npmUser and email from registry return fetchRegistry ( forPackages , { } , opts ) . then ( persons => { // reduce duplicates and add pre-known aliases return reduceDuplicates ( persons , opts ) } ) . then ( persons => { // add name, githubUser, and twitter from npm profile return fetchProfiles ( persons , opts ) } ) . then ( persons => { // finish with name and email from github return fetchGithub ( persons , opts ) } ) }
returns a Promise that resolves to fetched authors
returns a Promise that resolves to fetched authors