Created
October 8, 2023 10:17
-
-
Save aztack/62e9d2fc889ab9134cf6f1e5708b2203 to your computer and use it in GitHub Desktop.
printProgress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import readline from 'node:readline'; | |
function printProgress(text: string) { | |
readline.clearLine(process.stdout, 0); | |
readline.cursorTo(process.stdout, 0, undefined); | |
process.stdout.write(text); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment