From babd9d805ba168087ab09e3e5dfb69d4aa1a0155 Mon Sep 17 00:00:00 2001 From: Vipul Gupta Date: Sun, 29 Nov 2020 21:30:16 +0530 Subject: [PATCH] Add documentation for non-required prompt --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 752b6234..1625f334 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,9 @@ await cli.prompt('What is your two-factor token?', {type: 'mask'}) // mask input on keypress (before enter is pressed) await cli.prompt('What is your password?', {type: 'hide'}) +// prompt that isn't required, user can press enter and move onto the next prompt +await cli.prompt('(Optional) What is your email address?', {required: false}) + // yes/no confirmation await cli.confirm('Continue?')