jb3 / webhook-discord

A simple Javascript file for nicely formatting Discord webhooks
MIT License
101 stars 38 forks source link

Feature Request: Async/Await #56

Open Exitare opened 4 years ago

Exitare commented 4 years ago

Right now, the package lacks support of async await. Should this be implemented?

jb3 commented 4 years ago

What is the back compatibility like for this? I like the premise of async/await syntax but I don't fully know the benefits over the promise system.

Exitare commented 4 years ago

Async / Await is just syntactic sugar. There is no real change in functionality. You can write cleaner code in terms of avoiding callbacks.

jb3 commented 4 years ago

I see. How far back is async/await supported. I assume we'd have to drop support for older node versions.

Exitare commented 4 years ago

Earliest is Node v7.6 according to this article. https://www.infoq.com/news/2017/02/node-76-async-await/

But v8 supports it for sure!

jb3 commented 4 years ago

Okay this seems reasonable to me, this is a feature which I'm interested in having.