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

std/node/readline.ts

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.137.0/node/readline.ts";

Classes

Instances of the readline.Interface class are constructed using thereadline.createInterface() method. Every instance is associated with a single input Readable stream and a single output Writable stream. The output stream is used to print prompts for user input that arrives on, and is read from, the input stream.

Functions

The readline.clearLine() method clears current line of given TTY stream in a specified direction identified by dir.

The readline.clearScreenDown() method clears the given TTY stream from the current position of the cursor down.

The readline.createInterface() method creates a new readline.Interfaceinstance.

The readline.cursorTo() method moves cursor to the specified position in a given TTY stream.

The readline.emitKeypressEvents() method causes the given Readable stream to begin emitting 'keypress' events corresponding to received input.

The readline.moveCursor() method moves the cursor relative to its current position in a given TTY stream.