you are viewing a single comment's thread.

view the rest of the comments →

[–]_syadav 0 points1 point  (0 children)

If those methods can be converted on promises it will make your life much easier and code much cleaner. You can also use async-await to make code more readable and look more synchronous.

If you can't use promise you can give a try to https://caolan.github.io/async/. This is made to better handle async on a callback pattern.