diff options
author | Pranshu Srivastava <rexagod@gmail.com> | 2020-04-16 03:37:47 +0300 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2020-04-29 10:41:31 +0300 |
commit | 2cd79700c028f99f76f5b124b30009a838019b2b (patch) | |
tree | 518239ccb8b5660b461d81a864f94cb18c155614 /doc/api/stream.md | |
parent | e7b99e027b2fe2fc0834bf2df9daf6d94b27f02b (diff) |
stream: add null check in Readable.from
Throws `ERR_STREAM_NULL_VALUES` error if a null value is passed to
`Readable.from`. Also added docs for the same.
Co-Authored-By: 扩散性百万甜面包 <himself65@outlook.com>
Fixes: https://github.com/nodejs/node/issues/32845
PR-URL: https://github.com/nodejs/node/pull/32873
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r-- | doc/api/stream.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index e8993849090..134687530eb 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1700,7 +1700,8 @@ added: --> * `iterable` {Iterable} Object implementing the `Symbol.asyncIterator` or - `Symbol.iterator` iterable protocol. + `Symbol.iterator` iterable protocol. Emits an 'error' event if a null + value is passed. * `options` {Object} Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. |