atob for Node.JS and Linux / Mac / Windows CLI (it's a one-liner)
Dosyaya git
Robert Knight 50cb9f059a Fix atob under CommonJS module bundlers (eg. Browserify)
Browserify uses the browser version of the module but since
module.exports was not assigned, importing it fails.

 * Fix a typo in the browser implementation of 'browser-atob'

 * Fix reference to the source file in the tests

 * Export 'atob' implementation in 'browser-atob.js' via module
   exports
2015-12-28 09:59:15 +00:00
bin separate node use case from browser use case 2015-12-11 16:52:45 -08:00
LICENSE (MIT OR Apache-2.0) 2015-12-11 16:30:03 -08:00
LICENSE.DOCS satisfying the money-hungry lawyers... 2014-05-20 08:53:39 -06:00
README.md Update README.md 2015-12-14 11:46:48 -08:00
bower.json v2.0.1 2015-12-12 06:58:00 -08:00
browser-atob.js Fix atob under CommonJS module bundlers (eg. Browserify) 2015-12-28 09:59:15 +00:00
node-atob.js separate node use case from browser use case 2015-12-11 16:52:45 -08:00
package.json v2.0.1 2015-12-12 06:58:00 -08:00
test.js Fix atob under CommonJS module bundlers (eg. Browserify) 2015-12-28 09:59:15 +00:00

README.md

atob

Uses Buffer to emulate the exact functionality of the browser's atob.

Note: Unicode may be handled incorrectly (like the browser).

It turns base64-encoded ascii data back to binary.

(function () {
  "use strict";

  var atob = require('atob');
  var b64 = "SGVsbG8gV29ybGQ=";
  var bin = atob(b64);

  console.log(bin); // "Hello World"
}());

Need Unicode and Binary Support in the Browser?

Check out unibabel.js

Changelog

  • v2.0.0 provide browser version for ios web workers
  • v1.2.0 provide (empty) browser version
  • v1.1.3 add MIT license (see #4)
  • v1.1.2 node only

LICENSE

Code copyright 2012-2015 AJ ONeal

Dual-licensed MIT and Apache-2.0

Docs copyright 2012-2015 AJ ONeal

Docs released under Creative Commons.