Simplify the getInputData()
function
#545
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
馃搼 Summary
This is pretty minor, but currently the
getInputData()
function is:async()
function (inefficient since we don't useasync
)=>
) (not needed)Promise()
, which is considered bad practice, since it doesn't handle errors well, and it does show a good JavaScript Exception stackI've simplified the function, and replaced some of the manual
promise()
code with Node.JS's fs.promises API.馃搹 Design Decisions
Originally, I made these commits a long time ago, but forgot about them!
馃搵 Tasks
Make sure you
master
branch