Most of the solutions available have you coding the callback inside the promise. The method described here takes the callback function and returns both a modified callback, along with a linked promise. This promise resolves when that modified callback is executed. This helps when a callback has to be passed to an external module. The code to implement the conversion of callbacks to promises becomes as simple as the function below.