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 <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
mcollina authored and BethGriggs committed Apr 10, 2019
1 parent 26af6fb commit 0ac41fc
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 @@ -1286,9 +1286,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 @@ -46,7 +46,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 @@ -1036,7 +1035,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 0ac41fc

Please sign in to comment.