-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_prompt.deno.txt
17 lines (10 loc) · 1.62 KB
/
deno_prompt.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DENO_PROMPT
VERSION ==> #See deno doc
alert([STR]) #Similar to DOM: print STR (def: 'Alert') and wait for Enter on stdin (unless non-interactive)
confirm([STR])->BOOL #Same but returns BOOL based on stdin answer
#Def STR 'Confirm'. False if stdin not interactive
prompt([STR[, STR2]])->STR3 #Same but returns STR3|null answer.
#Def STR 'Prompt'. null if stdin not interactive, or if empty answer.
#STR2 is default value. "[STR2]" is appended to question STR