Closed robbywashere-zz closed 5 years ago
This is a good example of using async await in your library vs callbacks.
async-await has been available since node 7.10.1
https://node.green/#ES2017-features-async-functions
Luckily, since node 8 you can use promisify, included in the stdlib under 'utils': http://2ality.com/2017/05/util-promisify.html
promisify
Please be aware I haven't tested this sample myself, so perhaps you can give it a try before merging ;)
Thanks for the PR @robbywashere ! We didn't get a chance to review and incorporate your changes in v0.1.12 but will look to do so in the subsequent release.
v0.1.12
This is a good example of using async await in your library vs callbacks.
async-await has been available since node 7.10.1
https://node.green/#ES2017-features-async-functions
Luckily, since node 8 you can use
promisify
, included in the stdlib under 'utils': http://2ality.com/2017/05/util-promisify.htmlPlease be aware I haven't tested this sample myself, so perhaps you can give it a try before merging ;)