Skip to content

Commit

Permalink
fixup: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Sep 3, 2019
1 parent a26c3a0 commit 5b6e33a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/internal/streams/end-of-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ function isRequest(stream) {
function isReadable(stream) {
return typeof stream.readable === 'boolean' ||
typeof stream.readableEnded === 'boolean' ||
!!stream._readableState
!!stream._readableState;
}

function isWritable(stream) {
return typeof stream.writable === 'boolean' ||
typeof stream.writableEnded === 'boolean' ||
!!stream._writableState
!!stream._writableState;
}

function eos(stream, opts, callback) {
Expand Down Expand Up @@ -59,8 +59,10 @@ function eos(stream, opts, callback) {
};
}

let readable = opts.readable || (opts.readable !== false && isReadable(stream));
let writable = opts.writable || (opts.writable !== false && isWritable(stream));
let readable = opts.readable ||
(opts.readable !== false && isReadable(stream));
let writable = opts.writable ||
(opts.writable !== false && isWritable(stream));

const onlegacyfinish = () => {
if (!stream.writable) onfinish();
Expand Down

0 comments on commit 5b6e33a

Please sign in to comment.