It could be nice to allow the users to see also npm stats using their api - https://github.com/npm/registry/blob/master/docs/download-counts.md.
It probably requires to change the architecture so we should create a list of "sources" (classes?) and each of them will implement its own way to fetch (implementing interface with getDownloads?) the data but all of them should returns it in the same structure (type) so the views / components can handle it the same way.
Using this architecture, we can add more and more sources.
It could be nice to allow the users to see also npm stats using their api - https://github.com/npm/registry/blob/master/docs/download-counts.md.
It probably requires to change the architecture so we should create a list of "sources" (classes?) and each of them will implement its own way to fetch (implementing interface with
getDownloads?) the data but all of them should returns it in the same structure (type) so the views / components can handle it the same way.Using this architecture, we can add more and more sources.