} 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)
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