https://skimdb.npmjs.com/registry/_all_docs
This is a current method to pull all the package names.
The URL search is http://registry.npmjs.com/-/v1/search?text=<searchstring>&size=20
Edit1: 3 years later (Mar 2021) and this endpoint still works. Glad it’s still being helpful to folks 🙂
Edit2: Still working in April of 2022
Edit3: Still working as of February 2023