due

Due makes your callback behave well.

If you use to write asynchronous Node.js code, you might have encounter the Callback hell aka Pyramid of Doom. To avoid this pattern, it is common to wrap callback into Promises, or one of the equivalent (Q, Async, Vow ...). A promise is simply a different pattern allowing to write asynchronous sequence as a cascade of call, instead of a pyramide of call. Promises are coming in ECMAScript 6. so it is time to switch, and start writing better code. Due is very similar to promises, except for two things. However, you might already have tons of lines with callbacks. and you don't want to refactor everything. Here we provide to you a due compiler online compiler