Socket
Socket
Sign inDemoInstall

base64-format

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base64-format

Re-format base64 data


Version published
Weekly downloads
10
decreased by-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

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)?

Keywords

FAQs

Package last updated on 30 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc