| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0729fb6 commit d4cf423
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 | |
|---|---|---|---|
@@ -337,5 +337,7 @@ function finished(stream, opts) { | |||
| 337 | 337 | }); | |
| 338 | 338 | } | |
| 339 | 339 | ||
| 340 | - module.exports = eos; | ||
| 341 | - module.exports.finished = finished; | ||
| 340 | + module.exports = { | ||
| 341 | + eos, | ||
| 342 | + finished, | ||
| 343 | + }; | ||
| 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 | |
|---|---|---|---|
@@ -50,7 +50,7 @@ const { | |||
| 50 | 50 | addAbortSignal, | |
| 51 | 51 | addAbortSignalNoValidate, | |
| 52 | 52 | } = require('internal/streams/add-abort-signal'); | |
| 53 | - const eos = require('internal/streams/end-of-stream'); | ||
| 53 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 54 | 54 | ||
| 55 | 55 | let debug = require('internal/util/debuglog').debuglog('stream', (fn) => { | |
| 56 | 56 | 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 | |
|---|---|---|---|
@@ -84,7 +84,7 @@ const { | |||
| 84 | 84 | streamBaseState, | |
| 85 | 85 | } = internalBinding('stream_wrap'); | |
| 86 | 86 | ||
| 87 | - const finished = require('internal/streams/end-of-stream'); | ||
| 87 | + const { eos } = require('internal/streams/end-of-stream'); | ||
| 88 | 88 | ||
| 89 | 89 | const { UV_EOF } = internalBinding('uv'); | |
| 90 | 90 | ||
@@ -176,7 +176,7 @@ function newWritableStreamFromStreamWritable(streamWritable) { | |||
| 176 | 176 | backpressurePromise.resolve(); | |
| 177 | 177 | } | |
| 178 | 178 | ||
| 179 | - const cleanup = finished(streamWritable, (error) => { | ||
| 179 | + const cleanup = eos(streamWritable, (error) => { | ||
| 180 | 180 | error = handleKnownInternalErrors(error); | |
| 181 | 181 | ||
| 182 | 182 | cleanup(); | |
@@ -483,7 +483,7 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj | |||
| 483 | 483 | ||
| 484 | 484 | streamReadable.pause(); | |
| 485 | 485 | ||
| 486 | - const cleanup = finished(streamReadable, (error) => { | ||
| 486 | + const cleanup = eos(streamReadable, (error) => { | ||
| 487 | 487 | error = handleKnownInternalErrors(error); | |
| 488 | 488 | ||
| 489 | 489 | 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