[QUESTIONS] Refactoring and informations about files
Closed this issue · 4 comments
Hello,
I have seen that in your directory src/search
, you have a file name constants.js
.
I was wondering if this file is exclusively for the directory search
or for the whole application ?
I am asking that because there are duplicate constants like BASE_URL across multiple files and I was wondering if I can put everything here or I create a new one at the root of the src directory.
Thank you for your answer in advance.
This file is exclusively used by the src/search
folder.
I agree that there is a lot of things that could be removed from core files. I do think that a complete refactoring would be very interesting. It would also include making the library compatible with the browser as well.
For now, I would put the BASE_URL and other constants values into src/utils.js
or something alike just like you described.
Thanks for your contributions!
Ok, I see.
On point thought, can you elaborate on : It would also include making the library compatible with the browser as well
I am not sure to completely understand this sentance.
The idea is that it could be useful for such a library to be usable in the browser direcly instead of a node environment. As of now, I have not tested it but it is really heavy so probably unusable. Also, request
is not compatible for the browser to use.
The point remains that a refactoring would be very useful to this library!
Ok, noted.
I will see.
Thank for your answers.