DirtyHairy / node-libxl

Node.js bindings for libxl
MIT License
29 stars 15 forks source link

Support promises interface #20

Open gajus opened 6 years ago

gajus commented 6 years ago

It would be convenient if the node-libxl defaulted to returning promises when a callback is not provided.

DirtyHairy commented 6 years ago

Yeah, the thought has occurred to me too. My issue is that, in its current form, the library is completely implemented in native code --- the JS part is just the loader. This has proven very useful in real life to me often enough that I don't want to change it, and I don't want to deal with promises in C++.

Nevertheless, I'll look into overloading the calls in the JS part after the native code has loaded.