Fix a few minor bugs, and DRY up the registry data fetch
Fix a few minor bugs, and DRY up the registry data fetch

yyx990803/npm,Volune/npm,lxe/npm,DaveEmmerson/npm,chadnickbok/npm,misterbyrne/npm,DIREKTSPEED-LTD/npm,segment-boneyard/npm,segment-boneyard/npm,xalopp/npm,chadnickbok/npm,kriskowal/npm,kriskowal/npm,misterbyrne/npm,TimeToogo/npm,lxe/npm,yibn2008/npm,yodeyer/npm,ekmartin/npm,evocateur/npm,midniteio/npm,yodeyer/npm,DIREKTSPEED-LTD/npm,segrey/npm,Volune/npm,ekmartin/npm,cchamberlain/npm-msys2,yyx990803/npm,TimeToogo/npm,kriskowal/npm,segrey/npm,DIREKTSPEED-LTD/npm,princeofdarkness76/npm,segmentio/npm,princeofdarkness76/npm,thomblake/npm,thomblake/npm,midniteio/npm,yodeyer/npm,ekmartin/npm,kimshinelove/naver-npm,evanlucas/npm,yibn2008/npm,xalopp/npm,segmentio/npm,kemitchell/npm,kimshinelove/naver-npm,yibn2008/npm,evanlucas/npm,midniteio/npm,rsp/npm,misterbyrne/npm,evocateur/npm,kemitchell/npm,evocateur/npm,haggholm/npm,xalopp/npm,DaveEmmerson/npm,kemitchell/npm,rsp/npm,cchamberlain/npm-msys2,TimeToogo/npm,yyx990803/npm,segmentio/npm,haggholm/npm,segrey/npm,lxe/npm,rsp/npm,Volune/npm,chadnickbok/npm,segment-boneyard/npm,thomblake/npm,DaveEmmerson/npm,evanlucas/npm,cchamberlain/npm,princeofdarkness76/npm,cchamberlain/npm-msys2,haggholm/npm,cchamberlain/npm,cchamberlain/npm,kimshinelove/naver-npm