I am trying to use the base-64 library from
https://github.com/mathiasbynens/base64
When I run a test to validate the code I am not getting the right result. IS there any other library I can use?
Here is the code that I ran and the result I am getting
import utf8 from 'utf8'
import base64 from 'base-64'
var text = 'foo © bar baz';
var bytes = utf8.encode(text);
var encoded = base64.encode(bytes);
console.log(encoded);
// → 'Zm9vIMKpIGJhciDwnYyGIGJheg=='
Here is the result I am getting
W29iamVjdCBBcnJheUJ1ZmZlcl0=
Can some one please help
thanks in advance