Replies: 2 comments
-
Hi! Sadly (or maybe not sadly?) neither of those will work. plv8 doesn't have anything like Having said that - I did try to find a package that implemented this already. But most tend to go "the other way". async/await is the shiny new thing (since 2015ish) and I couldn't find any that did this. About |
Beta Was this translation helpful? Give feedback.
-
Sorry @papb I didn't mean to close this. I'll leave open until there's some sort of support for |
Beta Was this translation helpful? Give feedback.
-
Hi 😁
Your idea of sync-promises caught my attention because I implemented something like that once as well.
I am wondering - do you know if it is possible to spawn a subprocess with
.spawnSync
in plv8 context? Since plv8 seems based on V8, maybe it is possible... And in this case you could use make-synchronous instead of taking all this SyncPromise hassle.Another option would be to use p-syncy which uses deasync under the hood...
By the way, there are comments in your code saying that
.catch
is not supported but I recall managing to make.catch
work as well.Beta Was this translation helpful? Give feedback.
All reactions