forked from cerc-io/registry-sdk
Compare commits
16 Commits
cb1d74614c
...
8828b5388d
Author | SHA1 | Date | |
---|---|---|---|
8828b5388d | |||
f802e1d31c | |||
6add6d2844 | |||
1a42cf3836 | |||
ee4c431bc8 | |||
fea30985c5 | |||
75e302fd29 | |||
9a1abc18ca | |||
06adca6e81 | |||
2222276c73 | |||
8a14027316 | |||
74d5631753 | |||
bc3010f67b | |||
|
6aad0e2506 | ||
|
0880185a4b | ||
|
cf5bb9e7de |
@ -1162,7 +1162,7 @@ export const RecordsList = {
|
||||
declare var self: any | undefined;
|
||||
declare var window: any | undefined;
|
||||
declare var global: any | undefined;
|
||||
var _globalThis: any = (() => {
|
||||
var globalThis: any = (() => {
|
||||
if (typeof globalThis !== "undefined") return globalThis;
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
@ -1171,10 +1171,10 @@ var _globalThis: any = (() => {
|
||||
})();
|
||||
|
||||
function bytesFromBase64(b64: string): Uint8Array {
|
||||
if (_globalThis.Buffer) {
|
||||
return Uint8Array.from(_globalThis.Buffer.from(b64, "base64"));
|
||||
if (globalThis.Buffer) {
|
||||
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
||||
} else {
|
||||
const bin = _globalThis.atob(b64);
|
||||
const bin = globalThis.atob(b64);
|
||||
const arr = new Uint8Array(bin.length);
|
||||
for (let i = 0; i < bin.length; ++i) {
|
||||
arr[i] = bin.charCodeAt(i);
|
||||
@ -1184,14 +1184,14 @@ function bytesFromBase64(b64: string): Uint8Array {
|
||||
}
|
||||
|
||||
function base64FromBytes(arr: Uint8Array): string {
|
||||
if (_globalThis.Buffer) {
|
||||
return _globalThis.Buffer.from(arr).toString("base64");
|
||||
if (globalThis.Buffer) {
|
||||
return globalThis.Buffer.from(arr).toString("base64");
|
||||
} else {
|
||||
const bin: string[] = [];
|
||||
arr.forEach((byte) => {
|
||||
bin.push(String.fromCharCode(byte));
|
||||
});
|
||||
return _globalThis.btoa(bin.join(""));
|
||||
return globalThis.btoa(bin.join(""));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ export const PageResponse = {
|
||||
declare var self: any | undefined;
|
||||
declare var window: any | undefined;
|
||||
declare var global: any | undefined;
|
||||
var _globalThis: any = (() => {
|
||||
var globalThis: any = (() => {
|
||||
if (typeof globalThis !== "undefined") return globalThis;
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
@ -260,10 +260,10 @@ var _globalThis: any = (() => {
|
||||
})();
|
||||
|
||||
function bytesFromBase64(b64: string): Uint8Array {
|
||||
if (_globalThis.Buffer) {
|
||||
return Uint8Array.from(_globalThis.Buffer.from(b64, "base64"));
|
||||
if (globalThis.Buffer) {
|
||||
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
||||
} else {
|
||||
const bin = _globalThis.atob(b64);
|
||||
const bin = globalThis.atob(b64);
|
||||
const arr = new Uint8Array(bin.length);
|
||||
for (let i = 0; i < bin.length; ++i) {
|
||||
arr[i] = bin.charCodeAt(i);
|
||||
@ -273,14 +273,14 @@ function bytesFromBase64(b64: string): Uint8Array {
|
||||
}
|
||||
|
||||
function base64FromBytes(arr: Uint8Array): string {
|
||||
if (_globalThis.Buffer) {
|
||||
return _globalThis.Buffer.from(arr).toString("base64");
|
||||
if (globalThis.Buffer) {
|
||||
return globalThis.Buffer.from(arr).toString("base64");
|
||||
} else {
|
||||
const bin: string[] = [];
|
||||
arr.forEach((byte) => {
|
||||
bin.push(String.fromCharCode(byte));
|
||||
});
|
||||
return _globalThis.btoa(bin.join(""));
|
||||
return globalThis.btoa(bin.join(""));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4324,7 +4324,7 @@ export const GeneratedCodeInfo_Annotation = {
|
||||
declare var self: any | undefined;
|
||||
declare var window: any | undefined;
|
||||
declare var global: any | undefined;
|
||||
var _globalThis: any = (() => {
|
||||
var globalThis: any = (() => {
|
||||
if (typeof globalThis !== "undefined") return globalThis;
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
@ -4333,10 +4333,10 @@ var _globalThis: any = (() => {
|
||||
})();
|
||||
|
||||
function bytesFromBase64(b64: string): Uint8Array {
|
||||
if (_globalThis.Buffer) {
|
||||
return Uint8Array.from(_globalThis.Buffer.from(b64, "base64"));
|
||||
if (globalThis.Buffer) {
|
||||
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
||||
} else {
|
||||
const bin = _globalThis.atob(b64);
|
||||
const bin = globalThis.atob(b64);
|
||||
const arr = new Uint8Array(bin.length);
|
||||
for (let i = 0; i < bin.length; ++i) {
|
||||
arr[i] = bin.charCodeAt(i);
|
||||
@ -4346,14 +4346,14 @@ function bytesFromBase64(b64: string): Uint8Array {
|
||||
}
|
||||
|
||||
function base64FromBytes(arr: Uint8Array): string {
|
||||
if (_globalThis.Buffer) {
|
||||
return _globalThis.Buffer.from(arr).toString("base64");
|
||||
if (globalThis.Buffer) {
|
||||
return globalThis.Buffer.from(arr).toString("base64");
|
||||
} else {
|
||||
const bin: string[] = [];
|
||||
arr.forEach((byte) => {
|
||||
bin.push(String.fromCharCode(byte));
|
||||
});
|
||||
return _globalThis.btoa(bin.join(""));
|
||||
return globalThis.btoa(bin.join(""));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user