]> zoso.dev Git - buffer.git/commitdiff
standard
authorFeross Aboukhadijeh <feross@feross.org>
Wed, 21 Oct 2020 23:45:51 +0000 (13:45 -1000)
committerFeross Aboukhadijeh <feross@feross.org>
Wed, 21 Oct 2020 23:45:51 +0000 (13:45 -1000)
index.js

index e87bfaaa76ec628aebfeadf7cca0935cefa74257..c27327251799999880283cdeb2f298007b367391 100644 (file)
--- 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