hunk.code_window: export type ResolveOptions = {
     loggedPkg: LoggedPkg,
     got: Got,
     root: string,
     linkLocal: boolean,
     tag: string
   }
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.file_path: src/resolve/index.ts
hunk.type: replace
file: import registryUrl = require('registry-url')
  
  /**
   * Returns the registry needed for a certain package.
   */
  export default function registryFor (pkg: string) {
    if (pkg.substr(0, 1) === '@') {
      return registryUrl(pkg.split('/')[0])
    } else {
      return registryUrl()
    }
  }
  