From 341312d78a8b5b4d5ef03429161242dd9d9b9206 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 5 Aug 2021 20:01:33 +0200 Subject: [PATCH] readline: add `autoCommit` option PR-URL: https://github.com/nodejs/node/pull/37947 Fixes: https://github.com/nodejs/node/issues/37287 Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy --- doc/api/readline.md | 16 +++++++++----- lib/internal/readline/promises.js | 35 ++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index b886c5b2bb6578..cf2cf8a15377ce 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -599,12 +599,14 @@ setTimeout(() => ac.abort(), 10000); added: REPLACEME --> -#### `new readlinePromises.Readline(stream)` +#### `new readlinePromises.Readline(stream[, options])` * `stream` {stream.Writable} A [TTY][] stream. +* `options` {Object} + * `autoCommit` {boolean} If `true`, no need to call `rl.commit()`. #### `rl.clearLine(dir)`