Skip to content

Commit 0a10f23

Browse files
refactor: replaced the negation check with a positive check for clarity
PR-URL: #203
1 parent 2854e7d commit 0a10f23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ function chunkLength (chunk, encoding) {
236236
return 0
237237
}
238238

239-
return !Buffer.isBuffer(chunk)
240-
? Buffer.byteLength(chunk, encoding)
241-
: chunk.length
239+
return Buffer.isBuffer(chunk)
240+
? chunk.length
241+
: Buffer.byteLength(chunk, encoding)
242242
}
243243

244244
/**

0 commit comments

Comments
 (0)