Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support async/await by returning Promise #17

Open
zipang opened this issue Jun 21, 2017 · 1 comment
Open

Support async/await by returning Promise #17

zipang opened this issue Jun 21, 2017 · 1 comment

Comments

@zipang
Copy link

zipang commented Jun 21, 2017

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 added a commit to zipang/upndown that referenced this issue Jun 22, 2017
@zipang
Copy link
Author

zipang commented Jun 22, 2017

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant