Fix wrong paste

esisar-restrictions
Simon Vareille 2020-02-10 21:21:41 +01:00
parent 2a04c2486c
commit 5e288b9898
No known key found for this signature in database
GPG Key ID: 008AE8E706CC19F9
1 changed files with 1 additions and 23 deletions

View File

@ -36,29 +36,7 @@ exports.isString = function(data) {
exports.isTrue = function(data) {
if (this.isString(data)) {
return data === 'true';
} else /**
* Check Uint8Array equality
* @param {Uint8Array} first array
* @param {Uint8Array} second array
* @returns {Boolean} equality
*/
equalsUint8Array: function (array1, array2) {
if (!util.isUint8Array(array1) || !util.isUint8Array(array2)) {
throw new Error('Data must be in the form of a Uint8Array');
}
if (array1.length !== array2.length) {
return false;
}
for (let i = 0; i < array1.length; i++) {
if (array1[i] !== array2[i]) {
return false;
}
}
return true;
},
{
} else {
return Boolean(data);
}
};