(stream, opts)
| 189 | } |
| 190 | |
| 191 | function isFinished(stream, opts) { |
| 192 | if (!isNodeStream(stream)) { |
| 193 | return null; |
| 194 | } |
| 195 | |
| 196 | if (isDestroyed(stream)) { |
| 197 | return true; |
| 198 | } |
| 199 | |
| 200 | if (opts?.readable !== false && isReadable(stream)) { |
| 201 | return false; |
| 202 | } |
| 203 | |
| 204 | if (opts?.writable !== false && isWritable(stream)) { |
| 205 | return false; |
| 206 | } |
| 207 | |
| 208 | return true; |
| 209 | } |
| 210 | |
| 211 | function isWritableErrored(stream) { |
| 212 | if (!isNodeStream(stream)) { |
no test coverage detected
searching dependent graphs…