Languages
[Edit]
EN

TypeScript - atob / btoa functions equivalents in Node.js

3 points
Created by:
Bess
571

In this article, we would like to show you atob and btoa functions equivalents in TypeSrcipt in Node.js.

Note:

In the presented solution, we use the Buffer class, which is in a global scope in Node.js and does not need to be imported using the require() function.

The only thing you need to do is to install Node.js types for development using:

btoa function equivalent

Edit

In web browser JavaScript btoa() function is used to convert binary to Base64-encoded ASCII string. btoa function name should be read as "binary to ASCII".

Output:

atob function equivalent

Edit

In web browser JavaScript atob() function is used to convert Base64-encoded ASCII string to binary. atob function name should be read as "ASCII to binary".

Output:

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join