Javascript – Fetch file, read contents and return contents all in one function
I have been given the task of reading a file, processing the data and returning the results. As it is an async process, I run into the problem where you cannot return from a .then, and an unresolved Promise is…