# base-32

> Library to encode/decode strings or binary data in base32.

Latest version **0.0.3** (published 2017-10-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install base-32
pnpm add base-32
yarn add base-32
bun add base-32
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2017-10-09 |
| First published | 2017-06-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zach Perkitny |
| Maintainers | zachperkitny |
| Keywords | base32, base-32, encoding, decoding, RFC 4648, nodejs, node, javascript, js |

## Links

- npm: https://www.npmjs.com/package/base-32
- Repository: https://github.com/ZachPerkitny/Base-32
- Homepage: https://github.com/ZachPerkitny/Base-32#readme
- Issues: https://github.com/ZachPerkitny/Base-32/issues
- npm.io page: https://npm.io/package/base-32

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.3 (latest) — 2017-10-09
- 0.0.2 — 2017-06-05
- 0.0.1 — 2017-06-02

## README

## Base-32 [![CircleCI](https://circleci.com/gh/ZachPerkitny/Base-32.svg?style=svg)](https://circleci.com/gh/ZachPerkitny/Base-32)
Library to encode/decode strings or binary data in [base32](https://en.wikipedia.org/wiki/Base32).
**Note:** This library uses the RFC 4648 Base32 alphabet.

## Install
`npm install base-32`

## Usage
##### Setup
```
const base32 = require('base-32').default;
```
##### Encoding Strings
```
const str = 'Encode this string';
base32.encode(str);
```
###### Output
```
IVXGG33EMUQHI2DJOMQHG5DSNFXGO===
```
##### Encoding Binary Data
```
const buf = new Buffer('this is a tést');
base32.encode(buf);
```
###### Output
```
ORUGS4ZANFZSAYJAOTB2S43U
```
##### Decoding
```
const encodedString = 'ORSXG5DJNZTQ====';
base32.decode(encodedString);
```
###### Output
```
testing
```

## Methods
##### encode ⇒ <code>String</code>
Encodes a string or binary data in base32.

| Param | Type |
| --- | --- |
| input | <code>String</code> \| <code>Buffer</code> |

##### decode ⇒ <code>String</code>
Decodes data encoded in base32.

| Param | Type |
| --- | --- |
| input | <code>String</code> \| <code>Buffer</code> |

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