npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

btrz-base64-encoder

1.1.0 • Public • Published

btrz-base64-encoder Build Status NPM version

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.

install

npm i btrz-base64-encoder

Downloadsweekly downloads

336

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability