UNPKG
lib-curses
Version:
latest (0.2.0)
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.1
Simple node.js library for work with console
github.com/fwmakc/lib-curses
fwmakc/lib-curses
lib-curses
/
src
/
helpers
/
clear_line.helper.ts
10 lines
(9 loc)
•
233 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * Clears specified line in terminal. * *
@param
{
number
}
y
- Y coordinate of line to be cleared. *
@returns
{
void
} */
export
function
clearLine
(
y: number
):
void
{ process.
stdout
.
write
(
`\x1b[
${y +
1
}
;0H\x1b[K`
); }