Functions

f
listenToKeyboardKey(
inputString: string,
closure: (input: string) => void,
options?: { caseSensitive: boolean; }
): void

Registers a stdin listener that fires closure when the user types inputString (case-insensitive by default).

Usage

import * as mod from "lib/utils/listen-to-keyboard-key.ts";