Blame view

node_modules/btoa/README.md 806 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  btoa
  ===
  
  A port of the browser's `btoa` function.
  
  Uses `Buffer` to emulate the exact functionality of the browser's btoa (except that it supports unicode and the browser may not).
  
  It turns **b**inary data **to** base64-encoded **a**scii.
  
      (function () {
        "use strict";
        
        var btoa = require('btoa')
          , bin = "Hello, 世界"
          , b64 = btoa(bin)
          ;
  
        console.log(b64); // "SGVsbG8sIBZM"
      }());
  
  Note: Unicode may or may not be handled incorrectly.
  
  Copyright and license
  ===
  
  Code and documentation copyright 2012-2014 AJ ONeal Tech, LLC.
  
  Code released under the [Apache license](https://github.com/node-browser-compat/btoa/blob/master/LICENSE).
  
  Docs released under [Creative Commons](https://github.com/node-browser-compat/btoa/blob/master/LICENSE.DOCS).