Confirm
The Confirm
prompt is a simple yes or no prompt.
import { Confirm } from "https://deno.land/x/cliffy@v0.24.2/prompt/confirm.ts";
const confirmed: boolean = await Confirm.prompt("Can you confirm?");
Copy
deno run --unstable https://deno.land/x/cliffy@v0.24.2/examples/prompt/confirm.ts
Copy
Options
The Confirm
prompt has all base options and the following prompt
specific options.
Active label
The text for the active state can be changed with the active
option. Defaults
to 'Yes'
.
Inactive label
The text for the inactive state can be changed with the inactive
option.
Defaults to 'No'
.