Use promises
Closed this issue · 3 comments
gausie commented
For example, allow reader.connect().then(...)
santigimeno commented
I think I'm going to keep the callback interface as it seems the standard for async operations nowadays. Implementing a simple wrapper with promises as a separate module doesn't seem a difficult task. Thanks for the suggestion though!
gausie commented
Thanks! Just FYI, bluebird's Promise.promisifyAll(reader)
exposes all the functions (with "Async" appended) returning promises instead of relying on callbacks.
santigimeno commented
Thanks for the info!