From 5a7ac12357ebde98a35e946f19a1ba792d22b018 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sat, 17 Feb 2018 17:17:09 -0800 Subject: [PATCH] standard --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e806fe2..fa57ec4 100644 --- a/index.js +++ b/index.js @@ -692,7 +692,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000 } - byteOffset = +byteOffset // Coerce to Number. + byteOffset = +byteOffset // Coerce to Number. if (numberIsNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) @@ -944,8 +944,8 @@ function utf8Slice (buf, start, end) { var codePoint = null var bytesPerSequence = (firstByte > 0xEF) ? 4 : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 + : (firstByte > 0xBF) ? 2 + : 1 if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint -- 2.34.1