base64-format
Re-format base64 data
Last updated 10 years ago by neftaly .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install base64-format 
SYNC missed versions from official npm registry.

base64-format Build Status

Re-format base64 data from one implementation to another.

Variants

For the latest list, please refer to base64-variants.

  • base64: Vanilla base64 - default
  • base64_64/: Vanilla base64, with 64-char lines
  • base64_76: Vanilla base64, with 76-char lines
  • rfc4648: RFC 4648 (base64url)
  • rfc4648_alt: RFC 4648 with "="
  • rfc4648_ni: RFC 6920 (unpadded RFC 4648)
  • y64: YUI "Y64"
  • xml: XML-compatible

Install

npm install base64-format

Usage

var base64Format = require("base64-format");

var options = {
	from: "base64",
	to: "rfc4648"
}

base64Format(options, "heLLO+/="); //=> "heLLO-_.""

Note: this module supports currying.

var rfc4648 = base64Format({ from: "base64", to: "RFC 4648" });

rfc4648("heLLO+/="); //=> "heLLO-_."

Options

Key: type name = default

  • string from = "base64"
    Desired "from" base64 variant (see "Variants").

  • string to = "base64"
    Desired "to" base64 variant (see "Variants").

  • boolean clean = true
    Remove non-encoding characters (courtesy of base64-clean)?

Current Tags

  • 0.1.2                                ...           latest (10 years ago)

4 Versions

  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (1)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE