You want to look into using promises if you're working on Espruino and using Javascript but I don't know if they're in ESP8266 as it's fairly constrained. If not you might be able to include the class with a custom build.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You want to look into using promises if you're working on Espruino and using Javascript but I don't know if they're in ESP8266 as it's fairly constrained. If not you might be able to include the class with a custom build.