JS promise recursion
The other day I wanted to get some data from an API. The API is giving the information paginated, so I have to fetch it page by page.
I like to work with promises for things like this and I went on and googled loop promise. Found a few implementations, but I didn’t like them because they were a bit too technical and low level: the code didn’t communicate well the intent. So I set out to just write the code as close as possible to how I would express this logic to a human being.#js #promise #recursionhttp://meexposed.tumblr.com/post/133476594040/js-promise-recursion