Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

[Documentation] On process.stdout.cursorTo #6933

Closed
binarykitchen opened this issue Jan 22, 2014 · 5 comments
Closed

[Documentation] On process.stdout.cursorTo #6933

binarykitchen opened this issue Jan 22, 2014 · 5 comments
Labels

Comments

@binarykitchen
Copy link

It seems that there is no API documentation on process.stdout.cursorTo. Or it was too difficult for me to find any.

Also, is there a function to query the current cursor position? No idea. Thx!

indutny added a commit to indutny/node that referenced this issue Jan 23, 2014
@indutny
Copy link
Member

indutny commented Jan 23, 2014

Not exactly what you asked for, but anyway should be fixed by #6948

@binarykitchen
Copy link
Author

@indutny Easy. Let me ask you: Where is cursorTo() documented? Been searching everywhere in the node.js API docu but failed.

@indutny
Copy link
Member

indutny commented Jan 23, 2014

Have you seen #6948 that I mentioned in previous message ;)

@binarykitchen
Copy link
Author

Oh sorry. Missed out that commit. Great! No further questions.

@dcposch
Copy link

dcposch commented Nov 30, 2016

I think this is still an issue.

The readline module is not the same thing! It has its own function called cursorTo with different arguments.

I googled and can't find any documentation on process.stdout.cursorTo. However, in recent Node (v6.4.0), the following works:

var i = 0
setInterval(function () {
  process.stdout.write('test ' + (i++))
  process.stdout.cursorTo(0)
}, 1000)

In case process.std[out,err].cursorTo() and .clearLine() are deprecated and we're supposed to use readline now, then the docs should at least say that.

Here's an example of one popular module, node-progress, that still uses process.stdout.cursorTo: https://github.com/visionmedia/node-progress/blob/master/lib/node-progress.js#L195

richardlau pushed a commit to ibmruntimes/node that referenced this issue Jan 21, 2017
Addresses comment after PR nodejs#6933 merged.

nodejs/node#6933 (review)

PR-URL: nodejs/node#10345
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
gibfahn pushed a commit to ibmruntimes/node that referenced this issue Feb 22, 2017
Addresses comment after PR nodejs#6933 merged.

nodejs/node#6933 (review)

PR-URL: nodejs/node#10345
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants