Age, stability, and "community standing". The last one is github stars, whether the project is hosted by Apache, Google or Joe Blow, repo activity and all the rest.
Of course, what really matters is code quality, but who has the time to go through all the code.
And any library can be swapped out. It's frameworks that are really important, and those decisions are usually harder to make...