consola
consola copied to clipboard
Mask / disable sensitive input characters
Describe the feature
As a user, if I'm prompted to enter a sensitive string like a password, apiKey etc. I want to be able to paste / type it without stdout echoing it back to me. Like with the -s flag in bash's read. Or stty.
I see there is an exported password type, so perhaps already in development?
API changes suggestions:
add secureText as a type option to the prompt method.
Additional information
- [ ] Would you be willing to help implement this feature?
you could look at a library like redact-pii for that
I like such idea very much. We might need to make it opt-in as non breaking change also probably a similar alternative of rework of redact-pii without lodash dependency and maintained.