UNPKG

1.16 kBMarkdownView Raw
1atob
2===
3
4| **atob**
5| [btoa](https://git.coolaj86.com/coolaj86/btoa.js)
6| [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
7| Sponsored by [ppl](https://ppl.family)
8
9Uses `Buffer` to emulate the exact functionality of the browser's atob.
10
11Note: Unicode may be handled incorrectly (like the browser).
12
13It turns base64-encoded <strong>a</strong>scii data back **to** <strong>b</strong>inary.
14
15```javascript
16(function () {
17 "use strict";
18
19 var atob = require('atob');
20 var b64 = "SGVsbG8sIFdvcmxkIQ==";
21 var bin = atob(b64);
22
23 console.log(bin); // "Hello, World!"
24}());
25```
26
27### Need Unicode and Binary Support in the Browser?
28
29Check out [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
30
31Changelog
32=======
33
34 * v2.1.0 address a few issues and PRs, update URLs
35 * v2.0.0 provide browser version for ios web workers
36 * v1.2.0 provide (empty) browser version
37 * v1.1.3 add MIT license
38 * v1.1.2 node only
39
40LICENSE
41=======
42
43Code copyright 2012-2018 AJ ONeal
44
45Dual-licensed MIT and Apache-2.0
46
47Docs copyright 2012-2018 AJ ONeal
48
49Docs released under [Creative Commons](https://git.coolaj86.com/coolaj86/atob.js/blob/master/LICENSE.DOCS).