deps: Move adding to a set of module names to a function
deps: Move adding to a set of module names to a function

PR-URL: https://github.com/npm/npm/pull/9929

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