deps: Refactor module matchers into stand alone functions
deps: Refactor module matchers into stand alone functions

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

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