| Server IP : 74.208.250.37 / Your IP : 216.73.216.233 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : miferval ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/nodejs/es-abstract/2021/ |
Upload File : |
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var IsArray = require('./IsArray');
var isByteValue = require('../helpers/isByteValue');
// https://ecma-international.org/ecma-262/12.0/#sec-bytelistequal
module.exports = function ByteListEqual(xBytes, yBytes) {
if (!IsArray(xBytes) || !IsArray(yBytes)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xBytes.length !== yBytes.length) {
return false;
}
for (var i = 0; i < xBytes.length; i += 1) {
var xByte = xBytes[i];
var yByte = yBytes[i];
if (!isByteValue(xByte) || !isByteValue(yByte)) {
throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)');
}
if (xByte !== yByte) {
return false;
}
}
return true;
};