refactor: split out a helper function
refactor: split out a helper function

paladin74/weave,awh/weave,awh/weave,achanda/weave,bboreham/weave,beni55/weave,paladin74/weave,dpw/weave,2opremio/weave,cgvarela/weave,ycaihua/weave,ycaihua/weave,kidaa/weave,2opremio/weave,aaam/weave,kidaa/weave,n054/weave,Lawouach/weave,paladin74/weave,19hz/weave,tomwilkie/weave,ycaihua/weave,awanke/weave,narry/weave,philipz/weave,Lawouach/weave,errordeveloper/weave,errordeveloper/weave,awh/weave,philipz/weave,kidaa/weave,19hz/weave,19hz/weave,inercia/weave,BWITS/weave,tomwilkie/weave,inercia/weave,aaam/weave,awh/weave,squaremo/weave,bboreham/weave,n054/weave,cgvarela/weave,rade/weave,2opremio/weave,paladin74/weave,ycaihua/weave,dpw/weave,awanke/weave,inercia/weave,Lawouach/weave,OnePaaS/weave,bboreham/weave,narry/weave,dpw/weave,cgvarela/weave,paulbellamy/weave,n054/weave,awanke/weave,squaremo/weave,narry/weave,narry/weave,inercia/weave,Lawouach/weave,squaremo/weave,rade/weave,awh/weave,cgvarela/weave,OnePaaS/weave,paulbellamy/weave,weaveworks/weave,BWITS/weave,ycaihua/weave,kidaa/weave,19hz/weave,weaveworks/weave,beni55/weave,cgvarela/weave,achanda/weave,philipz/weave,BWITS/weave,paulbellamy/weave,aaam/weave,dpw/weave,achanda/weave,beni55/weave,bboreham/weave,BWITS/weave,errordeveloper/weave,rade/weave,inercia/weave,OnePaaS/weave,bboreham/weave,achanda/weave,paladin74/weave,n054/weave,weaveworks/weave,tomwilkie/weave,rade/weave,aaam/weave,dpw/weave,philipz/weave,weaveworks/weave,beni55/weave,tomwilkie/weave,rade/weave,OnePaaS/weave,philipz/weave,paulbellamy/weave,errordeveloper/weave,beni55/weave,n054/weave,awanke/weave,errordeveloper/weave,tomwilkie/weave,2opremio/weave,squaremo/weave,aaam/weave,kidaa/weave,OnePaaS/weave,BWITS/weave,awanke/weave,achanda/weave,2opremio/weave,squaremo/weave,narry/weave