Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/packages/prompt/prompts/toggle.ts>Toggle

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class Toggle
extends GenericPrompt<boolean, string, ToggleSettings>
import { Toggle } from "https://deno.land/x/cliffy@0.12.1/packages/prompt/prompts/toggle.ts";

Properties

protected
status: string

Methods

protected
format(value: boolean): string
protected
getValue(): string
protected
handleEvent(event: KeyEvent): Promise<boolean>
protected
read(): Promise<boolean>
protected
selectActive()
protected
selectInactive()
protected
setPrompt(message: string)
protected
transform(value: string): boolean | undefined
protected
validate(value: string): boolean | string

Static Methods

prompt(options: string | ToggleOptions): Promise<boolean>