From f25bbf12556eb5478ea876db825c230d1b1c650c Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Wed, 14 Aug 2019 22:35:41 +0200 Subject: [PATCH] readline: establish y in cursorTo as optional Parameter y in cursorTo() is optional and this is also verified by tests but docs don't state this. Besides that if the newly added parameter callback is used with no y, it's quite unhandy. This PR allows to simply omit y. PR-URL: https://github.com/nodejs/node/pull/29128 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/api/readline.md | 2 +- doc/api/tty.md | 2 +- lib/readline.js | 5 +++++ test/parallel/test-readline-csi.js | 8 ++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 47dfad8dabb..43d3a7e8f62 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -487,7 +487,7 @@ function completer(linePartial, callback) { } ``` -## readline.cursorTo(stream, x, y[, callback]) +## readline.cursorTo(stream, x[, y][, callback])