Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix async/await example #128

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

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Conversation

ianstormtaylor
Copy link
Contributor

Great resource!

Here's a fix for something I noticed in the async/await example. There's no need to await a call to require, and they might sooner be written in single lines to mimic the style used for the previous examples. I might have overlooked something though, if so, let me know!

There's no need to `await` a call to `require`, and they might sooner be written in single lines to mimic the style used for the previous examples.
@ryanmcdermott
Copy link
Owner

ryanmcdermott commented Jan 13, 2017

Hey Ian I'm glad you like it!

That is strictly true, you don't need to split out the require calls. The nice thing about your PR is that it reduces the amount of lines in general, which is always the clean way of doing things. The only disadvantage is that it tends to not be the way you and I would normally do module imports in production, as you'll probably need the required modules again later on. Having said all that, I'm pretty comfortable bringing this in, but I'll give others a day or two to chime in and see what they think!

@juniorwasiu
Copy link

What this all about

@ryanmcdermott ryanmcdermott merged commit aa069b3 into ryanmcdermott:master Jan 14, 2017
@ryanmcdermott
Copy link
Owner

Thanks Ian for your help!

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

Successfully merging this pull request may close these issues.

4 participants