diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-26 07:21:27 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-03-30 15:16:39 +0300 |
commit | f86f5736da72ad4f3fb50692461222590e2f0258 (patch) | |
tree | 6fee263bfca24abbf76b7a3f1517b8184c29f077 /lib/internal/stream_base_commons.js | |
parent | f0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27 (diff) |
benchmark,lib: change var to const
Refs: https://github.com/nodejs/node/pull/26679
PR-URL: https://github.com/nodejs/node/pull/26915
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'lib/internal/stream_base_commons.js')
-rw-r--r-- | lib/internal/stream_base_commons.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/internal/stream_base_commons.js b/lib/internal/stream_base_commons.js index 3f53e3903ad..53ddc6336b7 100644 --- a/lib/internal/stream_base_commons.js +++ b/lib/internal/stream_base_commons.js @@ -92,7 +92,7 @@ function onWriteComplete(status) { } function createWriteWrap(handle) { - var req = new WriteWrap(); + const req = new WriteWrap(); req.handle = handle; req.oncomplete = onWriteComplete; @@ -105,7 +105,7 @@ function createWriteWrap(handle) { function writevGeneric(self, data, cb) { const req = createWriteWrap(self[kHandle]); - var allBuffers = data.allBuffers; + const allBuffers = data.allBuffers; var chunks; var i; if (allBuffers) { @@ -120,7 +120,7 @@ function writevGeneric(self, data, cb) { chunks[i * 2 + 1] = entry.encoding; } } - var err = req.handle.writev(req, chunks, allBuffers); + const err = req.handle.writev(req, chunks, allBuffers); // Retain chunks if (err === 0) req._chunks = chunks; @@ -131,7 +131,7 @@ function writevGeneric(self, data, cb) { function writeGeneric(self, data, encoding, cb) { const req = createWriteWrap(self[kHandle]); - var err = handleWriteReq(req, data, encoding); + const err = handleWriteReq(req, data, encoding); afterWriteDispatched(self, req, err, cb); return req; |