From: Feross Aboukhadijeh Date: Mon, 20 Apr 2015 21:28:51 +0000 (-0700) Subject: remove unnecessary intermediate variables X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=5e3c62593b1e79ca2677c8b187d25a668c484103;p=buffer.git remove unnecessary intermediate variables --- diff --git a/index.js b/index.js index ed987ad..b150c25 100644 --- a/index.js +++ b/index.js @@ -383,13 +383,11 @@ function hexWrite (buf, string, offset, length) { } function utf8Write (buf, string, offset, length) { - var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) - return charsWritten + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) - return charsWritten + return blitBuffer(asciiToBytes(string), buf, offset, length) } function binaryWrite (buf, string, offset, length) { @@ -397,8 +395,7 @@ function binaryWrite (buf, string, offset, length) { } function base64Write (buf, string, offset, length) { - var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) - return charsWritten + return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) {