upndown icon indicating copy to clipboard operation
upndown copied to clipboard

Support async/await by returning Promise

Open zipang opened this issue 7 years ago • 1 comments

Callback style APIs are really a thing of the past now that async/await are available in node > 7 !
upndown.convert(html) should return a Promise when no callback is provided !

zipang avatar Jun 21 '17 13:06 zipang

I provided a Promise implementation by checking if a callback was passed.
Now it's really nice to be able to use await : var markdown = await upndown.convert(html);

zipang avatar Jun 22 '17 14:06 zipang