How does nodejs get the number of console rows?

process.stdout.write("\u001B[6n")

you can get the number of rows and columns

but how is the content obtained?

Mar.02,2021

for example, this?
https://github.com/tj/command.


https://gist.github.com/lance.


just use these two. Windows/CentOS test OK
process.stdout.rows
process.stdout.columns

Menu