If I'm looking for a library and I find two that do what I need, I generally go with the one with the higher star count because it signals a larger community and therefore it's more likely to get some bug fixes and improvements.
I don't think GitHub stars a reliable indicator of community size. They are often an indicator of how much effort someone has put into promoting the library on social media. Some people have starred thousands of repos that they only ever looked at once when they saw it on the front page of HN (I know, because I'm one of them).
A quick read of the source, tests, documentation, issues etc provide better information than counting stars in my experience.
> Some people have starred thousands of repos that they only ever looked at once when they saw it on the front page of HN (I know, because I'm one of them).
If you ever want to process and try and extract some value from those, I recommend this: https://astralapp.com/
I have very little interest in most of the differences in features, and the cost of switching is low in the future. So I'll just go with node-portfinder because it has more stars. ( I also notice the forks count is higher)