Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 23, 2024 via pnpm

base-64 1.0.0

A robust base64 encoder/decoder that is fully compatible with `atob()` and `btoa()`, written in JavaScript.
Package summary
Share
0
issues
1
license
1
MIT
Package created
13 May 2014
Version published
17 Oct 2020
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
base-64@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of base-64 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does base-64 do?

Base-64 is a robust JavaScript-base64 encoder and decoder that's fully compliant with atob() and btoa(), making it an extremely useful tool for developers. The algorithms for encoding and decoding comply fully with the standards outlined in the RFC 4648 section.

How do you use base-64?

Usage of base-64 greatly varies depending on your development environment; however, it's simple to integrate into your project. If you're using npm, installation only requires running npm install base-64. After installation, you can grab the module with var base64 = require('base-64'). To encode a string into base64, simply call base64.encode(input), and to decode, use base64.decode(encodedData). It should be noted that when handling Unicode strings, these need to be UTF-8 encoded first.

Example Code usage:

var base64 = require('base-64');
var utf8 = require('utf8');

var text = 'foo Β© bar πŒ† baz';
var bytes = utf8.encode(text);
var encoded = base64.encode(bytes);
console.log(encoded);

var encodedText = 'Zm9vIMKpIGJhciDwnYyGIGJheg==';
var decodedBytes = base64.decode(encodedText);
var decodedText = utf8.decode(decodedBytes);
console.log(decodedText);

Where are the base-64 docs?

The base-64 documentation is not specified in a dedicated section, but detailed explanations and examples can be found throughout the package's README file on its GitHub repository: https://github.com/mathiasbynens/base64.

All Versions