Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method promises.Readline.prototype.clearLine
Re-export
import { promises } from "https://deno.land/std@0.177.0/node/_readline.d.ts";
const { Readline } = promises;

Clears the current line the cursor is on.

Parameters

dir

Direction to clear: -1 for left of the cursor +1 for right of the cursor 0 for the entire line