clearLine
The clearLine method clears the current terminal line by writing a carriage return followed by the ANSI erase-line escape code. This is useful for overwriting spinner output or progress indicators.
Signature
betterConsole.clearLine(): void
Usage
import betterConsole from "ts-better-console";
// Write something, then clear it
process.stdout.write("Loading...");
// Clear the line and write new content
betterConsole.clearLine();
betterConsole.log("Done!");
Want to support this project?
If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.
Want to contribute to this project?
Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!