santigimeno/node-pcsclite

Any plan to provide a synchronous API?

Opened this issue · 4 comments

I am not sure to love call backs so much. Sometimes a synchronous API is fine, especially when you want to send a sequence of APDU and have nothing better to do.

Do you plan to also provide a synchronous version like it is the case for File IO API?
http://www.daveeddy.com/2013/03/26/synchronous-file-io-in-nodejs/

No, I hadn't thought of it. Do you have a specific API in mind? I guess you'd like a sync version of the CardReader functions, right?

Maybe something like what https://github.com/coolbong/node-pcsc is doing?

A synchronous transmit() and control() would be cool in a first step.

Can't you use async/await?

Maybe using async/await is the solution.
Feel free to close the issue.