sorry for not replying, just here's some feedback:
Promise.any() had a problem of not handling errors well. I wanted to make sure that even if an error happens, if a promise fulfills later, it's returned. I should have done the error handling inside the callback maybe, but I just wanted to write that sometimes something that looks like a simplification isn't it unfortunately.
I created the data map to be able to cache the results for a browser restart in the future. I haven't implemented it, but I think caching is important.
Much of the code in this module is unnecessary:
data
map is not needed, and is no different from just reusing the promise.Promise.any()
can replace thefirstGoodPromise()
function.