finally, welcome in the 21st century.
Nesting is not the problem, you see what you're doing (when you perform an async io request). And you still have the "if (e) return cb(e)" line... And on top of that, it does not look better.
cbs - cbSucces cbe - cbError replaces all the "if (e) return cb(e)" lines with cbe when you call the async function. A whole abstraction over js just because of this, running away from the problem...instead of solving…
finally, welcome in the 21st century.
Nesting is not the problem, you see what you're doing (when you perform an async io request). And you still have the "if (e) return cb(e)" line... And on top of that, it does not look better.
cbs - cbSucces cbe - cbError replaces all the "if (e) return cb(e)" lines with cbe when you call the async function. A whole abstraction over js just because of this, running away from the problem...instead of solving…