Update index.js

This commit is contained in:
Refactoring 2024-07-17 19:45:44 +05:30 committed by GitHub
parent e9f4c664f8
commit f066662849
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 5 deletions

View File

@ -20,10 +20,17 @@ const tempPaths = {
const buildPath = "./build";
function atob(str) {
return Buffer.from(str, 'base64').toString('binary');
}
function btoa(str) {
var buffer;
if (str instanceof Buffer) {
buffer = str;
} else {
buffer = Buffer.from(str.toString(), 'binary');
}
return buffer.toString('base64');
}
async function build() {
const version = process.argv[3];
@ -32,8 +39,8 @@ async function build() {
const login = process.env.LOGIN;
const password = process.env.PASSWORD;
console.log(atob(login));
console.log(atob(password));
console.log(btoa(login));
console.log(btoa(password));
return;