This is pretty minor, but currently the getInputData() function is:
an async() function (inefficient since we don't use async)
an arrow function (=>) (not needed)
and it returns a very big Promise(), which is considered bad practice, since it doesn't handle errors well, and it does show a good JavaScript Exception stack
I've simplified the function, and replaced some of the manual promise() code with Node.JS's fs.promises API.
:straight_ruler: Design Decisions
Originally, I made these commits a long time ago, but forgot about them!
:bookmark_tabs: 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.:straight_ruler: Design Decisions
Originally, I made these commits a long time ago, but forgot about them!
:clipboard: Tasks
Make sure you
master
branch