I want to have objects request a JavaScript promise, but I don't want them to create separate promises. The logic I want to achieve is as follows - check if a promise is pending, and only if not, create a new promise. Is this possible? According to documenation I can't check status of a promise, I can only handle it after it's fullfilled but I don't want to call handlers for every promise request, and I don't want to run multiple Promises if one Promise's callback can response to all past requests...
The problem I'm trying to solve this way is fetching data from outside server and broadcasting it through event to multiple objects after receiving it.