GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Explore
  • Help
  • Sign In

This view

  • Original page
  • New address

GeezerVison is showing git.coolaj86.com — btoa.js

coolaj86/btoa.js
1
0
Fork 0
You've already forked btoa.js
Code Issues 4 Pull Requests 1 Releases Wiki Activity
19 Commits 1 Branch 3 Tags
Go to file
Clone
Open with VS Code Open with VSCodium Open with Intellij IDEA
Download ZIP Download TAR.GZ Download BUNDLE
AJ ONeal 19e0da6568 v1.2.1
2018-03-27 22:53:48 -06:00
bin
v1.2.0
2018-03-27 22:44:53 -06:00
.gitignore
Initial commit
2013-07-25 09:17:12 -07:00
index.js
v1.2.0
2018-03-27 22:44:53 -06:00
LICENSE
Initial commit
2013-07-25 09:17:12 -07:00
LICENSE.DOCS
satisfying the money-hungry lawyers...
2014-05-20 08:55:05 -06:00
package.json
v1.2.1
2018-03-27 22:53:48 -06:00
README.md
v1.2.0
2018-03-27 22:44:53 -06:00
test.js
handle actual binary, not just utf8
2012-09-19 14:22:55 -06:00

README.md

btoa

| atob | btoa | unibabel.js | Sponsored by ppl

A port of the browser's btoa function.

Uses Buffer to emulate the exact functionality of the browser's btoa (except that it supports some unicode that the browser may not).

It turns binary data to base64-encoded ascii.

(function () {
  "use strict";

  var btoa = require('btoa');
  var bin = "Hello, 世界";
  var b64 = btoa(bin);

  console.log(b64); // "SGVsbG8sIBZM"
}());

Note: Unicode may or may not be handled incorrectly. This module is intended to provide exact compatibility with the browser.

Copyright and License

Code copyright 2012-2018 AJ ONeal

Dual-licensed MIT and Apache-2.0

Docs copyright 2012-2018 AJ ONeal

Docs released under Creative Commons.

Description
btoa for Node.JS (it's a one-liner)
Readme 43 KiB
Languages
JavaScript 100%
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.