Skip to content

Commit

Permalink
stream: make Symbol.asyncIterator support stable
Browse files Browse the repository at this point in the history
PR-URL: #26989
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • Loading branch information
mcollina authored and BethGriggs committed Oct 18, 2019
1 parent 18b140a commit 00831f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,13 @@ myReader.on('readable', () => {
##### readable\[Symbol.asyncIterator\]()
<!-- YAML
added: v10.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/26989
description: Symbol.asyncIterator support is no longer experimental.
-->

> Stability: 1 - Experimental
> Stability: 2 - Stable
* Returns: {AsyncIterator} to fully consume the stream.

Expand Down
2 changes: 0 additions & 2 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const {
ERR_METHOD_NOT_IMPLEMENTED,
ERR_STREAM_UNSHIFT_AFTER_END_EVENT
} = require('internal/errors').codes;
const { emitExperimentalWarning } = require('internal/util');

// Lazy loaded to improve the startup performance.
let StringDecoder;
Expand Down Expand Up @@ -1040,7 +1039,6 @@ Readable.prototype.wrap = function(stream) {
};

Readable.prototype[Symbol.asyncIterator] = function() {
emitExperimentalWarning('Readable[Symbol.asyncIterator]');
if (createReadableStreamAsyncIterator === undefined) {
createReadableStreamAsyncIterator =
require('internal/streams/async_iterator');
Expand Down

0 comments on commit 00831f0

Please sign in to comment.