4 ms·
I see you have never had to implement Promises in userland. :) setImmediate is one of the more popular polyfills in fact, all the workarounds you mentioned eit
by exogen 8y ago
I see you have never had to implement Promises in userland. :)
setImmediate is one of the more popular polyfills in fact, all the workarounds you mentioned either have downsides or are ugly hacks. It's useful to anything that has a scheduler. Like Vue for example. Maybe someone should tell Evan You that it doesn't make sense to need setImmediate?
https://github.com/vuejs/vue/blob/b111de486b1bdc747fe0f5795fe22697d151bb8c/src/core/util/next-tick.js#L33-L35 https://github.com/vuejs/vue/blob/b111de486b1bdc747fe0f5795f...
Check the download counts:
https://www.npmjs.com/package/setimmediate https://www.npmjs.com/package/setimmediate
https://www.npmjs.com/package/next-tick https://www.npmjs.com/package/next-tick
https://www.npmjs.com/package/set-immediate-shim https://www.npmjs.com/package/set-immediate-shim
https://www.npmjs.com/package/core-js#setimmediate https://www.npmjs.com/package/core-js#setimmediate