Or if you want to use native promises, I threw this together<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Dashron&#x2F;roads-coroutine" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Dashron&#x2F;roads-coroutine</a>