forked from olcxjas-softworks/LarpixClient
update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
14
electron/node_modules/@peculiar/utils/build/esm/bytes/equal.js
generated
vendored
Normal file
14
electron/node_modules/@peculiar/utils/build/esm/bytes/equal.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { toUint8Array } from "./buffer-source.js";
|
||||
export function equal(a, b, options = {}) {
|
||||
const left = toUint8Array(a);
|
||||
const right = toUint8Array(b);
|
||||
if (!options.constantTime && left.byteLength !== right.byteLength) {
|
||||
return false;
|
||||
}
|
||||
const length = Math.max(left.byteLength, right.byteLength);
|
||||
let diff = left.byteLength ^ right.byteLength;
|
||||
for (let i = 0; i < length; i++) {
|
||||
diff |= (left[i] ?? 0) ^ (right[i] ?? 0);
|
||||
}
|
||||
return diff === 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue