Someone else asked this a while back. Basically Promises don't have to be part of the JavaScript interpreter - Promise can just be a normal JS class that you use.
I haven't tried it, but there's a smallish promises implementation right here that you should be able to use (although it might need some changes for it to be usable with require).
I'd be happy to include a library if someone contributed one, but I'm not sure it's worth including in the Espruino interpreter given it can just be pulled in if needed.
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.
Hi Alex,
Someone else asked this a while back. Basically Promises don't have to be part of the JavaScript interpreter -
Promise
can just be a normal JS class that you use.I haven't tried it, but there's a smallish promises implementation right here that you should be able to use (although it might need some changes for it to be usable with
require
).I'd be happy to include a library if someone contributed one, but I'm not sure it's worth including in the Espruino interpreter given it can just be pulled in if needed.