request-ip package code explanation please

I was reading request-ip code. (Link here) and I noticed that when dealing with X-Forwarded-For part it is treated as if it will only be a string always. when in reality it’s very possible that it can be an array of IPs, and when it wants to get client ip from X-Forwarded-For, it assumes that it is just a string of IPs concatenated with a ‘,’ character

I expected it to join the IPs with a ‘,’ character if it was an array, but it’s not the case. what am I doing wrong?