update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
33
electron/node_modules/@peculiar/utils/build/esm/legacy/buffer-source-converter.js
generated
vendored
Normal file
33
electron/node_modules/@peculiar/utils/build/esm/legacy/buffer-source-converter.js
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { concat, equal, isArrayBuffer, isArrayBufferView, isBufferSource, toArrayBuffer, toUint8Array, toView, } from "../bytes/index.js";
|
||||
export class BufferSourceConverter {
|
||||
static isArrayBuffer(data) {
|
||||
return isArrayBuffer(data);
|
||||
}
|
||||
static toArrayBuffer(data) {
|
||||
return toArrayBuffer(data);
|
||||
}
|
||||
static toUint8Array(data) {
|
||||
return toUint8Array(data);
|
||||
}
|
||||
static toView(data, type) {
|
||||
return toView(data, type);
|
||||
}
|
||||
static isBufferSource(data) {
|
||||
return isBufferSource(data);
|
||||
}
|
||||
static isArrayBufferView(data) {
|
||||
return isArrayBufferView(data);
|
||||
}
|
||||
static isEqual(a, b) {
|
||||
return equal(a, b);
|
||||
}
|
||||
static concat(first, second, ...rest) {
|
||||
if (Array.isArray(first)) {
|
||||
return typeof second === "function"
|
||||
? concat(first, second)
|
||||
: concat(first);
|
||||
}
|
||||
const buffers = [first, second, ...rest].filter(Boolean);
|
||||
return concat(buffers);
|
||||
}
|
||||
}
|
||||
68
electron/node_modules/@peculiar/utils/build/esm/legacy/convert.js
generated
vendored
Normal file
68
electron/node_modules/@peculiar/utils/build/esm/legacy/convert.js
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
import { convert } from "../converters/index.js";
|
||||
function normalizeTextEncoding(encoding) {
|
||||
return encoding === "ascii" ? "binary" : encoding;
|
||||
}
|
||||
export class Convert {
|
||||
static DEFAULT_UTF8_ENCODING = "utf8";
|
||||
static isHex(data) {
|
||||
return convert.isHex(data);
|
||||
}
|
||||
static isBase64(data) {
|
||||
return convert.isBase64(data);
|
||||
}
|
||||
static isBase64Url(data) {
|
||||
return convert.isBase64Url(data);
|
||||
}
|
||||
static ToString(buffer, enc = "utf8") {
|
||||
return convert.toString(buffer, enc);
|
||||
}
|
||||
static FromString(str, enc = "utf8") {
|
||||
if (!str) {
|
||||
return new ArrayBuffer(0);
|
||||
}
|
||||
return convert.fromString(str, enc);
|
||||
}
|
||||
static ToBase64(buffer) {
|
||||
return convert.toBase64(buffer);
|
||||
}
|
||||
static FromBase64(base64) {
|
||||
return convert.fromBase64(base64);
|
||||
}
|
||||
static FromBase64Url(base64url) {
|
||||
return convert.fromBase64Url(base64url);
|
||||
}
|
||||
static ToBase64Url(data) {
|
||||
return convert.toBase64Url(data);
|
||||
}
|
||||
static FromUtf8String(text, encoding = Convert.DEFAULT_UTF8_ENCODING) {
|
||||
return convert.fromString(text, normalizeTextEncoding(encoding));
|
||||
}
|
||||
static ToUtf8String(buffer, encoding = Convert.DEFAULT_UTF8_ENCODING) {
|
||||
return convert.toString(buffer, normalizeTextEncoding(encoding));
|
||||
}
|
||||
static FromBinary(text) {
|
||||
return convert.fromBinary(text);
|
||||
}
|
||||
static ToBinary(buffer) {
|
||||
return convert.toBinary(buffer);
|
||||
}
|
||||
static ToHex(buffer) {
|
||||
return convert.toHex(buffer);
|
||||
}
|
||||
static FromHex(hexString) {
|
||||
return convert.fromHex(hexString);
|
||||
}
|
||||
static ToUtf16String(buffer, littleEndian = false) {
|
||||
return convert.toUtf16String(buffer, littleEndian);
|
||||
}
|
||||
static FromUtf16String(text, littleEndian = false) {
|
||||
return convert.fromUtf16String(text, littleEndian);
|
||||
}
|
||||
static Base64Padding(base64) {
|
||||
const padCount = 4 - (base64.length % 4);
|
||||
return padCount < 4 ? base64 + "=".repeat(padCount) : base64;
|
||||
}
|
||||
static formatString(data) {
|
||||
return convert.formatString(data);
|
||||
}
|
||||
}
|
||||
18
electron/node_modules/@peculiar/utils/build/esm/legacy/functions.js
generated
vendored
Normal file
18
electron/node_modules/@peculiar/utils/build/esm/legacy/functions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { concat, equal } from "../bytes/index.js";
|
||||
export function assign(target, ...sources) {
|
||||
for (const source of sources) {
|
||||
if (!source) {
|
||||
continue;
|
||||
}
|
||||
for (const prop in source) {
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
export function combine(...buf) {
|
||||
return concat(buf);
|
||||
}
|
||||
export function isEqual(bytes1, bytes2) {
|
||||
return equal(bytes1, bytes2);
|
||||
}
|
||||
3
electron/node_modules/@peculiar/utils/build/esm/legacy/index.js
generated
vendored
Normal file
3
electron/node_modules/@peculiar/utils/build/esm/legacy/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export { BufferSourceConverter } from "./buffer-source-converter.js";
|
||||
export { Convert } from "./convert.js";
|
||||
export { assign, combine, isEqual } from "./functions.js";
|
||||
Loading…
Add table
Add a link
Reference in a new issue