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
39
electron/node_modules/@peculiar/asn1-schema/build/es2015/helper.js
generated
vendored
Normal file
39
electron/node_modules/@peculiar/asn1-schema/build/es2015/helper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
export function isConvertible(target) {
|
||||
if (typeof target === "function" && target.prototype) {
|
||||
if (target.prototype.toASN && target.prototype.fromASN) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return isConvertible(target.prototype);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return !!(target && typeof target === "object" && "toASN" in target && "fromASN" in target);
|
||||
}
|
||||
}
|
||||
export function isTypeOfArray(target) {
|
||||
if (target) {
|
||||
const proto = Object.getPrototypeOf(target);
|
||||
if (proto?.prototype?.constructor === Array) {
|
||||
return true;
|
||||
}
|
||||
return isTypeOfArray(proto);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export function isArrayEqual(bytes1, bytes2) {
|
||||
if (!(bytes1 && bytes2)) {
|
||||
return false;
|
||||
}
|
||||
if (bytes1.byteLength !== bytes2.byteLength) {
|
||||
return false;
|
||||
}
|
||||
const b1 = new Uint8Array(bytes1);
|
||||
const b2 = new Uint8Array(bytes2);
|
||||
for (let i = 0; i < bytes1.byteLength; i++) {
|
||||
if (b1[i] !== b2[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue