santigimeno/node-pcsclite

Use promises

Closed this issue · 3 comments

For example, allow reader.connect().then(...)

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!

Thanks! Just FYI, bluebird's Promise.promisifyAll(reader) exposes all the functions (with "Async" appended) returning promises instead of relying on callbacks.

Thanks for the info!