()
| 188 | } |
| 189 | |
| 190 | async function nextAsync() { |
| 191 | for (;;) { |
| 192 | try { |
| 193 | const { value, done } = await iterator.next(); |
| 194 | |
| 195 | if (done) { |
| 196 | readable.push(null); |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | if (value === null) { |
| 201 | reading = false; |
| 202 | throw new ERR_STREAM_NULL_VALUES(); |
| 203 | } |
| 204 | |
| 205 | if (readable.push(value)) { |
| 206 | continue; |
| 207 | } |
| 208 | |
| 209 | reading = false; |
| 210 | } catch (err) { |
| 211 | readable.destroy(err); |
| 212 | } |
| 213 | break; |
| 214 | } |
| 215 | } |
| 216 | return readable; |
| 217 | } |
| 218 |