readline.cursorTo(stream, x[, y][, callback])


readline.cursorTo() 方法将光标移动到给定的 TTY stream 中的指定位置。

  • stream <stream.Writable>
  • x <number>
  • y <number>
  • callback <Function> Invoked once the operation completes.
  • Returns: <boolean> false if stream wishes for the calling code to wait for the 'drain' event to be emitted before continuing to write additional data; otherwise true.

The readline.cursorTo() method moves cursor to the specified position in a given TTY stream.