diff options
author | Robert Nagy <ronagy@icloud.com> | 2021-07-30 15:18:38 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2021-08-02 15:59:18 +0300 |
commit | ac621ff5e76469db2ec97d0b1d48c765a5fd29de (patch) | |
tree | d1b9c4f54bf77d1968b54d14efb1db43ed89b8cb /doc/api | |
parent | 45f98fc60d12ca97ebeb35974ad966547990eda4 (diff) |
stream: add readableDidRead if has been read from
Adds did read accessor used to determine whether a readable has been
read from.
PR-URL: https://github.com/nodejs/node/pull/39589
Refs: https://github.com/nodejs/undici/pull/907
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/stream.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index fc66885ebc9..312f200e61c 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1261,6 +1261,17 @@ added: v11.4.0 Is `true` if it is safe to call [`readable.read()`][stream-read], which means the stream has not been destroyed or emitted `'error'` or `'end'`. +##### `readable.readableDidRead` +<!-- YAML +added: REPLACEME +--> + +* {boolean} + +Allows determining if the stream has been or is about to be read. +Returns true if `'data'`, `'end'`, `'error'` or `'close'` has been +emitted. + ##### `readable.readableEncoding` <!-- YAML added: v12.7.0 |