()
| 156 | } |
| 157 | |
| 158 | async function nextSyncWithAsyncValues() { |
| 159 | for (;;) { |
| 160 | try { |
| 161 | const { value, done } = iterator.next(); |
| 162 | |
| 163 | if (done) { |
| 164 | readable.push(null); |
| 165 | return; |
| 166 | } |
| 167 | |
| 168 | const res = (value && |
| 169 | typeof value.then === 'function') ? |
| 170 | await value : |
| 171 | value; |
| 172 | |
| 173 | if (res === null) { |
| 174 | reading = false; |
| 175 | throw new ERR_STREAM_NULL_VALUES(); |
| 176 | } |
| 177 | |
| 178 | if (readable.push(res)) { |
| 179 | continue; |
| 180 | } |
| 181 | |
| 182 | reading = false; |
| 183 | } catch (err) { |
| 184 | readable.destroy(err); |
| 185 | } |
| 186 | break; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | async function nextAsync() { |
| 191 | for (;;) { |
no test coverage detected
searching dependent graphs…