btrz-base64-encoder

1.2.0 • Public • Published

btrz-base64-encoder

This module encodes and decodes strings, values and objects literals to url friendly base64 strings.

Runtimes supported

io.js >= 1.0.3 node >= v0.11.x

Install

npm install btrz-base64-encoder --save

Usage

var base64 = require("btrz-base64-encoder");
var obj = {
    "name": "John",
    "last": "Smith",
    "age": 24
};
var encoded = base64.encode(obj);
//
var decode = base64.decode(encoded);
/*
    {
        "name": "John",
        "last": "Smith",
        "age": 24
    }
*/

You can pass anything to the encode method. Internally will use JSON.stringify to deal with Objects, so all restrictions regarding depth for the stringify method also apply in this case.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.034latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.034
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i btrz-base64-encoder

Weekly Downloads

34

Version

1.2.0

License

MIT

Unpacked Size

7.65 kB

Total Files

6

Last publish

Collaborators

  • betterez-support
  • hgarcia