Promises?

Posted on
  • I saw an old thread referencing Promises, but can't seem to find an official Promise module anywhere. I tried an implementation by @favo from this thread but a simple console.log() test had erroneous results where callbacks occurred before resolutions.

    Trying to save a bit of time myself and hoping this was already implemented.

  • It's built-in to all the new firmwares: http://www.espruino.com/Reference#PromisĀ­e

    I guess you're using ESP8266 so I'm not sure if you're using a build that has it disabled or something, but on an official board with up to date firmware then it's just already there as soon as you type new Promise(...)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Promises?

Posted by Avatar for espftw @espftw

Actions