Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 19851f8

Browse filesBrowse files
mattprbengl
authored andcommitted
doc: readline 'line' event emits final line
Updated docs to reflect current behaviour of readline: final line of input will be emitted via `'line'` event when input stream `'end'` event is emitted even when the input is not newline terminated. Refs: nodejs/node-v0.x-archive#7238 PR-URL: #42214 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 62d9a7f commit 19851f8
Copy full SHA for 19851f8

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/readline.md‎

Copy file name to clipboardExpand all lines: doc/api/readline.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ The `'line'` event is emitted whenever the `input` stream receives an
111111
end-of-line input (`\n`, `\r`, or `\r\n`). This usually occurs when the user
112112
presses <kbd>Enter</kbd> or <kbd>Return</kbd>.
113113

114+
The `'line'` event is also emitted if new data has been read from a stream and
115+
that stream ends without a final end-of-line marker.
116+
114117
The listener function is called with a string containing the single line of
115118
received input.
116119

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.