I find I\'m often unsatisfied with the ordering and expressiveness of searches on https://www.npmjs.com/. I guess there should be a way to programmatically query the server
If you can't find a package or are just hacking together a shell script the Registry API Docs in the registry's git repository include detailed information on Search API and search qualifiers.
If you're looking for the most popular insecure package in the public registry run:
wget -qO - "http://registry.npmjs.com/-/v1/search?text=is:insecure&popularity=1.0&size=1"
The above uses the is:insecure
search qualifier without any additional text criteria and grabs size=1
results where popularity=1.0
(the most popular).
Check in the docs directory in the repo for a number of other useful things such as: