# universal-base64

> Small universal base64 functions for node.js and browsers

Latest version **2.1.0** (published 2019-05-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install universal-base64
pnpm add universal-base64
yarn add universal-base64
bun add universal-base64
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-05-26 |
| First published | 2018-05-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | Blake Embrey |
| Maintainers | blakeembrey |
| Keywords | base64, atob, bota, universal, node, browser |

## Links

- npm: https://www.npmjs.com/package/universal-base64
- Repository: https://github.com/blakeembrey/universal-base64
- Issues: https://github.com/blakeembrey/universal-base64/issues
- npm.io page: https://npm.io/package/universal-base64

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2019-05-26
- 2.0.1 — 2018-10-10
- 2.0.0 — 2018-10-08
- 1.0.0 — 2018-05-20

## README

# Universal Base64

[![NPM version](https://img.shields.io/npm/v/universal-base64.svg?style=flat)](https://npmjs.org/package/universal-base64)
[![NPM downloads](https://img.shields.io/npm/dm/universal-base64.svg?style=flat)](https://npmjs.org/package/universal-base64)
[![Build status](https://img.shields.io/travis/blakeembrey/universal-base64.svg?style=flat)](https://travis-ci.org/blakeembrey/universal-base64)
[![Test coverage](https://img.shields.io/coveralls/blakeembrey/universal-base64.svg?style=flat)](https://coveralls.io/r/blakeembrey/universal-base64?branch=master)
[![Bundle size](https://img.shields.io/bundlephobia/minzip/universal-base64.svg)](https://bundlephobia.com/result?p=universal-base64)

> Small universal base64 functions for node.js and browsers.

Why? Universal projects deployed to browsers should not need `Buffer` for base64 functionality already built into browsers (`window.btoa` and `window.atob`).

## Installation

```
npm install universal-base64 --save
```

## Usage

```js
import { decode, encode } from "universal-base64";

encode("test"); //=> "dGVzdA=="
decode("dGVzdA=="); //=> "test"
```

## TypeScript

This module uses [TypeScript](https://github.com/Microsoft/TypeScript) and contains type definitions on NPM.

## License

Apache 2.0

---
_Source: https://npm.io/package/universal-base64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
