Refactor input functions
krishna-acondy opened this issue · comments
Currently, the input functions getNumber()
, getString()
etc. return an object with the specified field name as a key, and its value being the value that was entered by the user.
Instead, we can do away with fieldName
and directly return the value to the consumer.
Additionally, there is no error handling for scenarios where the user tries to exit using Ctrl + C
.
In these cases, the value will be null or undefined, which we need to handle.