I'm not sure when promises came to the javascript, but it seems weird that people would settle with callback hell for so long without even attempting to refactoring it.
I mean if I didn't have the option of using promises, I would have probably written something like this.
I mean if I didn't have the option of using promises, I would have probably written something like this.
function handler(callback){