Refactoring example: Callbacks to promises | Dark Hacker News