node js btoa code example
Example 1: nodejs btoa
Buffer.from('Hello world!', 'binary').toString('base64')
Example 2: atob nodejs
(function () {
"use strict";
var atob = require('atob');
var b64 = "SGVsbG8sIFdvcmxkIQ==";
var bin = atob(b64);
console.log(bin); // "Hello, World!"
}());