Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 765 Bytes

atob.md

File metadata and controls

23 lines (18 loc) · 765 Bytes
title tags author_title author_url author_image_url description image
atob
node,string,beginner
Deepak Vishwakarma
Implementation of "atob" in typescript, javascript and deno.

JS

Decodes a string of data which has been encoded using base-64 encoding.

Create a Buffer for the given string with base-64 encoding and use Buffer.toString('binary') to return the decoded string.

const atob = (str) => Buffer.from(str, "base64").toString("binary");
atob("Zm9vYmFy"); // 'foobar'