JavaScript Terminal Base64 Coder

// Copy the following code into a file.js to parse values from terminal
function getBase64(base64) {
    return Buffer.from(base64).toString('base64');
  }
console.log(getBase64(process.argv[2]));

// In terminal write the following granted nodejs is installed.
// node {filename}.js {string you want to convert to base64}
Lucky-Magnet