Current Folder
This commit is contained in:
1 parent
8b3382289b
commit
cfcada880d
4379 files changed
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
export const version = "base64/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
import { arrayify } from "@ethersproject/bytes";
|
||||
export function decode(textData) {
|
||||
textData = atob(textData);
|
||||
const data = [];
|
||||
for (let i = 0; i < textData.length; i++) {
|
||||
data.push(textData.charCodeAt(i));
|
||||
}
|
||||
return arrayify(data);
|
||||
}
|
||||
export function encode(data) {
|
||||
data = arrayify(data);
|
||||
let textData = "";
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
textData += String.fromCharCode(data[i]);
|
||||
}
|
||||
return btoa(textData);
|
||||
}
|
||||
//# sourceMappingURL=browser.js.map
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
import { arrayify } from "@ethersproject/bytes";
|
||||
export function decode(textData) {
|
||||
return arrayify(new Uint8Array(Buffer.from(textData, "base64")));
|
||||
}
|
||||
;
|
||||
export function encode(data) {
|
||||
return Buffer.from(arrayify(data)).toString("base64");
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in new issue
Block a user