Skip to content
Pierre Cauchois edited this page May 15, 2017 · 4 revisions

Ideas, Projects and Future Versions

Using promises

The current API form (nodebacks, or callbacks) works well but causes many levels of code nesting that are not exactly elegant. We are maintaining a form of API that makes it promisifiable using promise libraries such as bluebird but we are definitely considering the following approach for the future:

  • test for each function if a callback function has been passed:
  • if yes, use the callback function
  • if not, return a promise

Please see this page for more examples of using the current SDK implementation with promises.

Terminating compatibility for older versions of Node.js

Currently the SDK is compatible with versions of Node.js all the way back to Node 0.10. That is because we want our SDK to work with all versions of node that can be found by default on devices such as Raspberry Pi, Intel Edison, BeagleBoards etc. This being said, Node 0.10 and 0.12 have been completely deprecated and some dependencies are dropping support for it so we cannot guarantee it'll stay that way. Node.js v4 and up should have no problem and we strongly encourage customers to install more a recent version.