From 6d2ea35f3323c13becab95e6820345b6cd713efb Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sat, 25 Jan 2014 15:12:42 -0800 Subject: [PATCH] style --- index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.js b/index.js index 69a97e2..97d7091 100644 --- a/index.js +++ b/index.js @@ -123,7 +123,7 @@ Buffer.isEncoding = function (encoding) { } Buffer.isBuffer = function (b) { - return (b != null && b._isBuffer) || false + return !!(b !== null && b !== undefined && b._isBuffer) } Buffer.byteLength = function (str, encoding) { @@ -203,12 +203,10 @@ function _hexWrite (buf, string, offset, length) { } function _utf8Write (buf, string, offset, length) { - var bytes, pos return Buffer._charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length) } function _asciiWrite (buf, string, offset, length) { - var bytes, pos return Buffer._charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) } @@ -217,7 +215,6 @@ function _binaryWrite (buf, string, offset, length) { } function _base64Write (buf, string, offset, length) { - var bytes, pos return Buffer._charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) } -- 2.34.1