Skip to content

Commit

Permalink
doc: unify format of iterables
Browse files Browse the repository at this point in the history
Also, make signatures easier for copy-paste testing.

PR-URL: #20036
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
vsemozhetbyt authored and jasnell committed Apr 16, 2018
1 parent 5008c5a commit faf563e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1206,16 +1206,14 @@ myReader.on('readable', () => {
});
```

##### readable[@@asyncIterator]
##### readable\[Symbol.asyncIterator\]()
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental
* {AsyncIterator}

Returns an [AsyncIterator][async-iterator] to fully consume the stream.
* Returns: {AsyncIterator} to fully consume the stream.

```js
const fs = require('fs');
Expand Down Expand Up @@ -2415,4 +2413,3 @@ contain multi-byte characters.
[readable-destroy]: #stream_readable_destroy_error
[writable-_destroy]: #stream_writable_destroy_err_callback
[writable-destroy]: #stream_writable_destroy_error
[async-iterator]: https://github.com/tc39/proposal-async-iteration
4 changes: 2 additions & 2 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ percent-encoded where necessary.

Returns an ES6 Iterator over the values of each name-value pair.

#### urlSearchParams\[@@iterator\]()
#### urlSearchParams\[Symbol.iterator\]()

* Returns: {Iterator}

Expand Down Expand Up @@ -1174,7 +1174,7 @@ console.log(myURL.origin);
[`url.toJSON()`]: #url_url_tojson
[`url.toString()`]: #url_url_tostring
[`urlSearchParams.entries()`]: #url_urlsearchparams_entries
[`urlSearchParams@@iterator()`]: #url_urlsearchparams_iterator
[`urlSearchParams@@iterator()`]: #url_urlsearchparams_symbol_iterator
[ICU]: intl.html#intl_options_for_building_node_js
[Punycode]: https://tools.ietf.org/html/rfc5891#section-4.4
[WHATWG URL Standard]: https://url.spec.whatwg.org/
Expand Down

0 comments on commit faf563e

Please sign in to comment.