I'm currently porting over code from a Python program that is decoding and encoding a string in a somewhat long sequence of decode() and encode() calls. In Python it looks as follows:
import codecs
input = '3E061F00000E10FE'
data = codecs.encode(codecs.decode(input, "hex"), "base64").decode().strip()
When printed out in Python the result of data is: PgYfAAAOEP4=
I tried to reconstruct this in Javascript and Python by taking apart the whole encode/decode sequence and separating each function call so I could compare the two to see if I got the correct result from the Javascript version of the code. I was unsuccessful since the results from the Javascript and Python versions of the code were different.
So my question is if anybody knows what the equivalent of the Python code would be in Javascript.
Edit: Just to be clear, I'm in a Node.js environment