Skip to content

Commit

Permalink
doc: update readline asyncIterator docs
Browse files Browse the repository at this point in the history
This commit:
- Removes an unnecessary stability index entry. These generally
  are not included for Stable entries.
- Remove mention of experimental status that is not true anymore.
- Remove use of "we"
- Remove use of relative time phrasing.
- Misc cleanup.

PR-URL: #28425
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
cjihrig authored and targos committed Jul 2, 2019
1 parent 0d2d116 commit 3fea2e4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions doc/api/readline.md
Expand Up @@ -318,8 +318,6 @@ changes:
description: Symbol.asyncIterator support is no longer experimental. description: Symbol.asyncIterator support is no longer experimental.
--> -->


> Stability: 2 - Stable
* Returns: {AsyncIterator} * Returns: {AsyncIterator}


Create an `AsyncIterator` object that iterates through each line in the input Create an `AsyncIterator` object that iterates through each line in the input
Expand All @@ -332,10 +330,8 @@ If the loop is terminated with `break`, `throw`, or `return`,
[`rl.close()`][] will be called. In other words, iterating over a [`rl.close()`][] will be called. In other words, iterating over a
`readline.Interface` will always consume the input stream fully. `readline.Interface` will always consume the input stream fully.


A caveat with using this experimental API is that the performance is Performance is not on par with the traditional `'line'` event API. Use `'line'`
currently not on par with the traditional `'line'` event API, and thus it is instead for performance-sensitive applications.
not recommended for performance-sensitive applications. We expect this
situation to improve in the future.


```js ```js
async function processLineByLine() { async function processLineByLine() {
Expand Down

0 comments on commit 3fea2e4

Please sign in to comment.