3 ms·
There is a slight limitation where you async operation returns before you assign your call back. By using an object (in this case a promise) you could cache th
by robmcm 13y ago
There is a slight limitation where you async operation returns before you assign your call back.
By using an object (in this case a promise) you could cache the result and make it available to anyone adding a listener in the future.