Module

x/cliffy/prompt/mod.ts>GenericInput

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class GenericInput
extends GenericPrompt<T, V, S>
Abstract
import { GenericInput } from "https://dotland.deno.dev/x/cliffy@v0.23.2/prompt/mod.ts";

Generic input prompt representation.

Constructors

new
protected
GenericInput(settings: S)

Prompt constructor.

Properties

protected
inputIndex: number
protected
inputValue: string

Methods

protected
addChar(char: string): void

Add character to current input.

protected
deleteChar(): void

Delete char left.

protected
deleteCharRight(): void

Delete char right.

protected
getCurrentInputValue(): string
protected
handleEvent(event: KeyCode): Promise<void>

Handle user input event.

protected
highlight(
value: string | number,
color1?: (val: string) => string,
color2?: (val: string) => string,
): string
protected
input(): string
protected
message(): string
protected
moveCursorLeft(): void

Move prompt cursor left.

protected
moveCursorRight(): void

Move prompt cursor right.

import GenericInput
import { GenericInput } from "https://dotland.deno.dev/x/cliffy@v0.23.2/prompt/mod.ts";