The only issue I see here is that promise is always asynchronous and using then for function chaining might compromise shared data.
I'm not sure I understand you. Could you give an example of what you mean by "compromising shared data"?
I mean that each time you chain a function using then that function is added to the queue which means that it will wait for at least a tick to be called, my only concern is if during that tick a variable, that one of the callbacks relies on, is modified. Maybe is not a pressing matter, just a concern I have.
Nice post tho.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.