| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4815e4a commit b483b5a
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ const { | |||
| 17 | 17 | kControllerErrorFunction, | |
| 18 | 18 | } = require('internal/streams/utils'); | |
| 19 | 19 | ||
| 20 | - const eos = require('internal/streams/end-of-stream'); | ||
| 20 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 21 | 21 | let addAbortListener; | |
| 22 | 22 | ||
| 23 | 23 | // This method is inlined here for readable-stream | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ const { | |||
| 23 | 23 | ERR_MISSING_ARGS, | |
| 24 | 24 | }, | |
| 25 | 25 | } = require('internal/errors'); | |
| 26 | - const eos = require('internal/streams/end-of-stream'); | ||
| 26 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 27 | 27 | ||
| 28 | 28 | module.exports = function compose(...streams) { | |
| 29 | 29 | if (streams.length === 0) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ const { | |||
| 16 | 16 | isReadableStream, | |
| 17 | 17 | isWritableStream, | |
| 18 | 18 | } = require('internal/streams/utils'); | |
| 19 | - const eos = require('internal/streams/end-of-stream'); | ||
| 19 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 20 | 20 | const { | |
| 21 | 21 | AbortError, | |
| 22 | 22 | codes: { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -336,5 +336,7 @@ function finished(stream, opts) { | |||
| 336 | 336 | }); | |
| 337 | 337 | } | |
| 338 | 338 | ||
| 339 | - module.exports = eos; | ||
| 340 | - module.exports.finished = finished; | ||
| 339 | + module.exports = { | ||
| 340 | + eos, | ||
| 341 | + finished, | ||
| 342 | + }; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ const { | |||
| 10 | 10 | SymbolDispose, | |
| 11 | 11 | } = primordials; | |
| 12 | 12 | ||
| 13 | - const eos = require('internal/streams/end-of-stream'); | ||
| 13 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 14 | 14 | const { once } = require('internal/util'); | |
| 15 | 15 | const destroyImpl = require('internal/streams/destroy'); | |
| 16 | 16 | const Duplex = require('internal/streams/duplex'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ const { Buffer } = require('buffer'); | |||
| 48 | 48 | const { | |
| 49 | 49 | addAbortSignal, | |
| 50 | 50 | } = require('internal/streams/add-abort-signal'); | |
| 51 | - const eos = require('internal/streams/end-of-stream'); | ||
| 51 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 52 | 52 | ||
| 53 | 53 | let debug = require('internal/util/debuglog').debuglog('stream', (fn) => { | |
| 54 | 54 | debug = fn; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,7 +46,7 @@ const EE = require('events'); | |||
| 46 | 46 | const Stream = require('internal/streams/legacy').Stream; | |
| 47 | 47 | const { Buffer } = require('buffer'); | |
| 48 | 48 | const destroyImpl = require('internal/streams/destroy'); | |
| 49 | - const eos = require('internal/streams/end-of-stream'); | ||
| 49 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 50 | 50 | ||
| 51 | 51 | const { | |
| 52 | 52 | addAbortSignal, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,7 +83,7 @@ const { | |||
| 83 | 83 | streamBaseState, | |
| 84 | 84 | } = internalBinding('stream_wrap'); | |
| 85 | 85 | ||
| 86 | - const finished = require('internal/streams/end-of-stream'); | ||
| 86 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 87 | 87 | ||
| 88 | 88 | const { UV_EOF } = internalBinding('uv'); | |
| 89 | 89 | ||
@@ -175,7 +175,7 @@ function newWritableStreamFromStreamWritable(streamWritable) { | |||
| 175 | 175 | backpressurePromise.resolve(); | |
| 176 | 176 | } | |
| 177 | 177 | ||
| 178 | - const cleanup = finished(streamWritable, (error) => { | ||
| 178 | + const cleanup = eos(streamWritable, (error) => { | ||
| 179 | 179 | error = handleKnownInternalErrors(error); | |
| 180 | 180 | ||
| 181 | 181 | cleanup(); | |
@@ -472,7 +472,7 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj | |||
| 472 | 472 | ||
| 473 | 473 | streamReadable.pause(); | |
| 474 | 474 | ||
| 475 | - const cleanup = finished(streamReadable, (error) => { | ||
| 475 | + const cleanup = eos(streamReadable, (error) => { | ||
| 476 | 476 | error = handleKnownInternalErrors(error); | |
| 477 | 477 | ||
| 478 | 478 | cleanup(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,7 +45,7 @@ const compose = require('internal/streams/compose'); | |||
| 45 | 45 | const { setDefaultHighWaterMark, getDefaultHighWaterMark } = require('internal/streams/state'); | |
| 46 | 46 | const { pipeline } = require('internal/streams/pipeline'); | |
| 47 | 47 | const { destroyer } = require('internal/streams/destroy'); | |
| 48 | - const eos = require('internal/streams/end-of-stream'); | ||
| 48 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 49 | 49 | const internalBuffer = require('internal/buffer'); | |
| 50 | 50 | ||
| 51 | 51 | const promises = require('stream/promises'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments