Well, when you think about the amount of data collection required to reach this level of coverage I don't blame a smallish start-up like Twilio for not having a library.
After all, if you want to test to see if a number is valid, try and call it.
It's a daunting amount to approach, but it rarely takes more than an hour or two per country. I've been doing something similar for my current project, because I want to take phone numbers in national form and show them in both international and national forms.
This stuff is non-trivial. I'll guess that I have spent in excess of 50 hours working on just the UK data in the last couple of months.
The problem is this. Although there are hundreds of websites with UK area code lists, almost all of them are either incorrect, out of date, full of typos, or are generally unreliable. Even lists from "official" sources cannot be relied on with any degree of certainty. The obvious errors are easy to find and correct. It took a long time to find out there were many non-obvious errors and there are likely more errors still to be uncovered.
After all, if you want to test to see if a number is valid, try and call it.