npm.io
1.0.2-r • Published 8 years ago

probase64

Licence
ISC
Version
1.0.2-r
Deps
0
Size
5 kB
Vulns
0
Weekly
0

ProBase UTF-16

Install

There are a few ways you can get the probase64 library.

Node

probase64 is on npm. Simply run:

npm install proBase64

Or add it to your package.json dependencies.

You can use it as follows:

var ProBaseDec = require('ProBaseDec').ProBaseDec;
var ProBaseEnc = require('ProBaseEnc').ProBaseEnc;
HTML Page Usage
  <!-- Required for non-UTF encodings -->
  <script src="proBase64.js"></script>

And in your scripts:

var ProBaseDec = window.ProBaseDec;
var ProBaseEnc = window.ProBaseEnc;
API Overview

Basic Usage

  var uint16array = new ProBaseEnc('utf-16').encode(string);
  var string = new ProBaseDec('utf-16').decode(uint16array);