Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

chore: convert to async await syntax #28

Merged
merged 4 commits into from
Oct 14, 2019

Conversation

PedroMiguelSS
Copy link
Contributor

This PR converts this module's both exported getResponse and resolver functions to async/await syntax.

It also adds a util file called p-try-each that mimics the same async/tryEach method.

Closes #27.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me! Just asked minor things to get this to the finish line

src/resolver.js Show resolved Hide resolved
@@ -0,0 +1,25 @@
'use strict'

const pTryEeach = async (iterable) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create a module for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can and I will. Can we merge this as it is and then update it later to use the module that I'll create?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have a typo in the fn name pTryEeachshould be pTryEach

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops 🤦‍♂️

@@ -0,0 +1,25 @@
'use strict'

const pTryEeach = async (iterable) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have a typo in the fn name pTryEeachshould be pTryEach

@PedroMiguelSS PedroMiguelSS force-pushed the chore/convert-to-async-await-syntax branch from 61e7445 to e4e672c Compare October 7, 2019 14:57
@vasco-santos vasco-santos merged commit fcbfd3f into master Oct 14, 2019
@vasco-santos vasco-santos deleted the chore/convert-to-async-await-syntax branch October 14, 2019 09:56
vasco-santos added a commit that referenced this pull request Oct 14, 2019
BREAKING CHANGE: All places in the API that used callbacks are now replaced with async/await

Co-authored-by: PedroMiguelSS <pedro.santos@moxy.studio>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert to use async/await
3 participants