| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1661,12 +1661,31 @@ console.log(listenerCount(myEmitter, 'event')); | |||
| 1661 | 1661 | added: | |
| 1662 | 1662 | - v13.6.0 | |
| 1663 | 1663 | - v12.16.0 | |
| 1664 | + changes: | ||
| 1665 | + - version: REPLACEME | ||
| 1666 | + pr-url: https://github.com/nodejs/node/pull/52080 | ||
| 1667 | + description: Support `highWaterMark` and `lowWaterMark` options, | ||
| 1668 | + For consistency. Old options are still supported. | ||
| 1669 | + - version: | ||
| 1670 | + - v20.0.0 | ||
| 1671 | + pr-url: https://github.com/nodejs/node/pull/41276 | ||
| 1672 | + description: The `close`, `highWatermark`, and `lowWatermark` | ||
| 1673 | + options are supported now. | ||
| 1664 | 1674 | --> | |
| 1665 | 1675 | ||
| 1666 | 1676 | * `emitter` {EventEmitter} | |
| 1667 | 1677 | * `eventName` {string|symbol} The name of the event being listened for | |
| 1668 | 1678 | * `options` {Object} | |
| 1669 | 1679 | * `signal` {AbortSignal} Can be used to cancel awaiting events. | |
| 1680 | + * `close` - {string\[]} Names of events that will end the iteration. | ||
| 1681 | + * `highWaterMark` - {integer} **Default:** `Number.MAX_SAFE_INTEGER` | ||
| 1682 | + The high watermark. The emitter is paused every time the size of events | ||
| 1683 | + being buffered is higher than it. Supported only on emitters implementing | ||
| 1684 | + `pause()` and `resume()` methods. | ||
| 1685 | + * `lowWaterMark` - {integer} **Default:** `1` | ||
| 1686 | + The low watermark. The emitter is resumed every time the size of events | ||
| 1687 | + being buffered is lower than it. Supported only on emitters implementing | ||
| 1688 | + `pause()` and `resume()` methods. | ||
| 1670 | 1689 | * Returns: {AsyncIterator} that iterates `eventName` events emitted by the `emitter` | |
| 1671 | 1690 | ||
| 1672 | 1691 | ```mjs | |
| Back | FazBrowse Home | New Git URL |
0 commit comments