# @juanrdbo/react-native-quick-base64

> A native implementation of base64 in C++ for React Native

Latest version **0.4.0** (published 2023-07-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @juanrdbo/react-native-quick-base64
pnpm add @juanrdbo/react-native-quick-base64
yarn add @juanrdbo/react-native-quick-base64
bun add @juanrdbo/react-native-quick-base64
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2023-07-23 |
| First published | 2023-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16.0.0 |
| Dependencies | 1 |
| Unpacked size | 69.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | JuanRdBO |
| Maintainers | juanrdbo |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/@juanrdbo/react-native-quick-base64
- Repository: https://github.com/JuanRdBO/react-native-quick-base64
- Homepage: https://github.com/JuanRdBO/react-native-quick-base64.git#readme
- Issues: https://github.com/JuanRdBO/react-native-quick-base64.git/issues
- npm.io page: https://npm.io/package/@juanrdbo/react-native-quick-base64

## Dependencies (1)

- [base64-js](https://npm.io/package/base64-js.md) ^1.5.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2023-07-23
- 0.3.0 — 2023-07-23
- 0.2.1 — 2023-07-23
- 0.2.0 — 2023-07-23

## README

# react-native-quick-base64

A native implementation of base64 in C++ for React Native. It's a direct port of [CraftzDogs's](https://github.com/craftzdog/react-native-quick-base64) repository with the same name.

## Installation

```sh
npm install react-native-quick-base64
```

## Usage

```js
import { btoa, atob } from 'react-native-quick-base64';

const base64 = btoa('foo');
const decoded = atob(base64);
```

## Methods

Compatible with [base64-js](https://github.com/beatgammit/base64-js).

### `byteLength(b64: string): number`

Takes a base64 string and returns length of byte array

### `toByteArray(b64: string): Uint8Array`

Takes a base64 string and returns a byte array

### `fromByteArray(uint8: Uint8Array): string`

Takes a byte array and returns a base64 string

### `btoa(data: string): string`

Encodes a string in base64

### `atob(b64: string): string`

Decodes a base64 encoded string

### `shim()`

Adds `btoa` and `atob` functions to `global`.

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT by [Takuya Matsuyama](https://github.com/craftzdog)

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)

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