# base32url

> Base32 with URL-safe alphabet (thus Base32URL)

Latest version **0.0.6** (published 2021-06-09) · GPL-3.0-only license · 0 weekly downloads

## Install

```sh
npm install base32url
pnpm add base32url
yarn add base32url
bun add base32url
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2021-06-09 |
| First published | 2021-05-19 |
| Weekly downloads | 0 |
| License | GPL-3.0-only |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 37.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vitor Pamplona |
| Maintainers | vitorpamplona |

## Links

- npm: https://www.npmjs.com/package/base32url
- Repository: https://github.com/Path-Check/base32-url-js
- Homepage: https://github.com/Path-Check/base32-url-js#readme
- Issues: https://github.com/Path-Check/base32-url-js/issues
- npm.io page: https://npm.io/package/base32url

## Dependencies (2)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [hi-base32](https://npm.io/package/hi-base32.md) ^0.5.1

## Recent versions

- 0.0.6 (latest) — 2021-06-09
- 0.0.5 — 2021-06-02
- 0.0.4 — 2021-05-19
- 0.0.3 — 2021-05-19

## README

# base32-url-js

Very simple extension to hi-base32 to encode/decode using URL-safe characters. Same idea of Base64URL, thus Base32URL. 

## Installation

Use this command to install:

    npm install base32url

## Usage
You could use like this:

If you use node.js, you should require the module first:
```js
const Base32URL = require('base32url');
```

or import it
```js
import * as Base32URL from 'base32url';
```

And then just call the functions when needed: 

```js
Base32URL.encode('String to encode');
Base32URL.decode([]]);
```

### Methods

#### Base32URL.encode(input)

Encode string or bytes to base32url, set asciiOnly to true for better performace if it is.

##### *input: `String`, `Array`, `Uint8Array` or `ArrayBuffer`*

Input string or bytes to encode.

#### Base32URL.decode(base32Str)

Decode Base32URL string and return a *`byte array`*

##### *base32Str: `String`*

Base32URL string to decode.

#### Base32URL.decodeAsString(base32Str)

Decode Base32URL string and return a *`string`*

##### *base32Str: `String`*

Base32URL string to decode.

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