$ npm install base64-clean
Remove non-encoding characters from a base64 string.
For the latest list, please refer to base64-variants.
base64
: Vanilla base64 - defaultrfc4648
: RFC 4648 (base64url)rfc4648_alt
: RFC 4648 with "="y64
: YUI "Y64"xml
: XML-compatiblenpm install base64-clean
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"
Key: type name = default
© 2010 - cnpmjs.org x YWFE | Home | YWFE