Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base64-clean

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base64-clean

Clean dirty base64

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27
increased by92.86%
Maintainers
1
Weekly downloads
 
Created
Source

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").

Keywords

FAQs

Package last updated on 18 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