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

base64-clean Build Status

Remove non-encoding characters from a base64 string.

Variants

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

  • base64: Vanilla base64 - default
  • rfc4648: RFC 4648 (base64url)
  • rfc4648_alt: RFC 4648 with "="
  • y64: YUI "Y64"
  • xml: XML-compatible

Install

npm install base64-clean

Usage

var base64Clean = require("base64-clean");

base64Clean({ variant: "base64" }, "a@z#A$Z(0!9+`="); //=> "azAZ09+="

Note: this module supports currying.

var cleanRfc4648 = base64Clean({ variant: "rfc4648" });

cleanRfc4648("a@z#A$Z(0!9+`="); //=> "azAZ09"

Options

Key: type name = default

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

Current Tags

  • 0.1.0                                ...           latest (10 years ago)

2 Versions

  • 0.1.0                                ...           10 years ago
  • 0.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (1)
Dependents (1)

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