From 37c67934d05bbeeaf44d5a76f728e9ed704bb342 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 21 Oct 2020 13:45:51 -1000 Subject: [PATCH] standard --- index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index e87bfaa..c273272 100644 --- a/index.js +++ b/index.js @@ -947,10 +947,13 @@ function utf8Slice (buf, start, end) { while (i < end) { var firstByte = buf[i] var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 + var bytesPerSequence = (firstByte > 0xEF) + ? 4 + : (firstByte > 0xDF) + ? 3 + : (firstByte > 0xBF) + ? 2 + : 1 if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint -- 2.34.1