# web-base64

> Slightly modernized version of base64-js

Latest version **1.0.2** (published 2020-02-16) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-02-16 |
| First published | 2020-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Florian Klampfer |
| Maintainers | qwtel |

## Links

- npm: https://www.npmjs.com/package/web-base64
- Repository: https://github.com/qwtel/web-base64
- Homepage: https://github.com/qwtel/web-base64#readme
- Issues: https://github.com/qwtel/web-base64/issues
- npm.io page: https://npm.io/package/web-base64

## Recent versions

- 1.0.2 (latest) — 2020-02-16
- 1.0.1 — 2020-02-16

## README

# Web Base64
Slightly modernized version of [`base64-js`](https://github.com/beatgammit/base64-js). 

Main difference is the option to generate URL-friendly Base64,
where
- `+` => `-`,
- `/` => `_` and
- `=` => `~` (these are unreserved URI characters according to [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2.3))

This version also drops support for platforms that don't provide `Uint8Array` and `DataView`.

API has slightly changed and now expects an `ArrayBuffer` instead of an `Uint8Array`, whcih makes it easier to use with other typed arrays and without the need for additional copying. 

## Usage

```js
const mobyDick = await fs.promises.readFile(path.resolve('test/mobydick.txt'));
const b64String = fromByteArray(mobyDick.buffer)
```

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