import { Number } from "https://deno.land/x/cliffy@v0.18.0/mod.ts";
Number prompt representation.
Methods
protected
addChar(char: string): voidAdd char to input.
protected
format(value: number): stringFormat output value.
protected
getValue(): stringGet input input.
protected
handleEvent(event: KeyEvent): Promise<void>Handle user input event.
protected
manipulateIndex(decrease?: boolean)Decrease/increase input number.
protected
transform(value: string): number | undefinedMap input value to output value.
protected
validate(value: string): boolean | stringValidate input value.
Decrease input number.
Increase input number.
Static Methods
inject(value: string): void
Inject prompt value. Can be used for unit tests or pre selections.
prompt(options: string | NumberOptions): Promise<number>
Execute the prompt and show cursor on end.