Email-prompt
email-prompt
CLI email prompt featuring autocompletion and validation.
email-prompt
Powers 𝚫now --login and provides a nice promised based API for email autocompletion and validation.
It's customiziable with the below options:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
Get it: npm install --save email-prompt
Sample usage:
1 2 3 4 5 6 7 8 |
|
Important to note:
email-prompt
automatically adapts the mode ofprocess.stdin
for you.- The
stdin
stream isresume
d andpause
d upon the promise being settled. - When the promise resolves or rejects, the previous stdin mode is restored.
- The
tty
mode is set toraw
, which means all the caret interactions that you come to expect in a regularstdin
prompt are simulated. This gives us fine-grained control over the output and powers the validation.
GIF FTW!