Skip to content

Commit

Permalink
fixup: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 10, 2021
1 parent 3d0d042 commit a97bff0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
const {
ArrayIsArray,
Promise,
MathMax,
SymbolAsyncIterator,
} = primordials;

Expand Down Expand Up @@ -322,7 +321,7 @@ function pipelineImpl(streams, callback, opts) {
return ret;
}

function pipe (src, dst) {
function pipe(src, dst) {
if (typeof src.read !== 'function') {
src.pipe(dst);
return;
Expand All @@ -334,7 +333,7 @@ function pipe (src, dst) {
dst
.on('drain', pump);

function end () {
function end() {
dst.end();
}

Expand All @@ -345,13 +344,14 @@ function pipe (src, dst) {
dst._writableState?.objectMode
);

function pump () {
function pump() {
if (dst.writableNeedDrain) {
return;
}

while (true) {
const chunk = src.read((!objectMode && dst.writableHighwaterMark) || undefined);
const n = (!objectMode && dst.writableHighwaterMark) || undefined;
const chunk = src.read(n);
if (chunk === null || !dst.write(chunk)) {
return;
}
Expand Down

0 comments on commit a97bff0

Please sign in to comment.