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

chore: Prefer async functions #248

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mroderick
Copy link
Contributor

Since the codebase already uses async/await and requires node 14+, it might as well use async/await instead of then for Promises

By using async/await we can reduce the indentation levels, which generally makes the code easier to understand.

If refactoring like this is welcome, then I will expand on this PR to tidy up the test file and the source file it tests. Future PRs can tidy up other file pairs.

Since the codebase already uses async/await and requires node 14+, it might as well use async/await instead of then for Promises
@animir
Copy link
Owner

animir commented Dec 24, 2023

@mroderick Hey, refactoring is always welcome. Thank you for all the PRs you made recently. They are all valuable.

@mroderick mroderick marked this pull request as draft December 25, 2023 15:56
@mroderick
Copy link
Contributor Author

@mroderick Hey, refactoring is always welcome. Thank you for all the PRs you made recently. They are all valuable.

OK, then I'll add more to this PR. Setting it back to draft :)

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.

None yet

2 participants