readline.clearLine(stream, dir[, callback])
版本历史
| 版本 | 变更 |
|---|---|
| v18.0.0 | 将无效回调传给 |
| v12.7.0 | 流的 write() 回调和返回值是公开的。 |
| v0.7.7 | 新增于: v0.7.7 |
-
stream<stream.Writable> -
dir<number>-
-1:从光标向左\
-1: to the left from cursor -
1:从光标向右\
1: to the right from cursor -
0:整行\
0: the entire line
-
-
callback<Function> 操作完成后调用。\
callback<Function> Invoked once the operation completes. -
返回:<boolean>
false(如果stream希望调用代码在继续写入附加数据之前等待'drain'事件触发);否则true。\Returns: <boolean>
falseifstreamwishes for the calling code to wait for the'drain'event to be emitted before continuing to write additional data; otherwisetrue.
readline.clearLine() 方法在 dir 标识的指定方向上清除给定 TTY 流的当前行。
\The readline.clearLine() method clears current line of given TTY stream
in a specified direction identified by dir.