npms-io / npms-api

The https://npms.io API
MIT License
189 stars 30 forks source link

Prefix restriction support #71

Open chabou opened 6 years ago

chabou commented 6 years ago

Thank you a lot for this service 😍. Really amazing.

Can you confirm that is not possible to restrict results to have only package with a given prefix?

For example, I would like to have all packages that begin with loader- I read docs and (packages) source code. Although it is possible to make some regex with ElasticSearch, I didn't found anything.

Thank you!

segrey commented 6 years ago

Prefix filtering would allow to use npms.io to complete dependencies in package.json.

satazor commented 6 years ago

At the moment there's no such feature but it would be easy to add it. We could add that via a modifier or even a new API endpoint, or perhaps both?

segrey commented 6 years ago

@satazor That would be great! Either will work for me.