# base64url-universal

> Encode/decode "Base64url Encoding" format of JSON Web Signature (JWS) RFC7517.

Latest version **2.0.0** (published 2022-06-02) · BSD-3-Clause license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-06-02 |
| First published | 2019-02-19 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM |
| Node | >=14 |
| Dependencies | 1 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Digital Bazaar, Inc. |
| Maintainers | davidlehn, msporny, dlongley, mattcollier |
| Keywords | base64, base64url |

## Links

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

## Dependencies (1)

- [base64url](https://npm.io/package/base64url.md) ^3.0.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-06-02
- 1.1.0 — 2019-08-22
- 1.0.1 — 2019-07-03
- 1.0.0 — 2019-02-19

## README

<a name="module_base64url-universal"></a>

## base64url-universal
Encode/Decode input according to the "Base64url Encoding" format as specified
in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and
trailing '=', line breaks, whitespace, and other characters are omitted.


* [base64url-universal](#module_base64url-universal)
    * [encode(input)](#exp_module_base64url-universal--encode) ⇒ <code>string</code> ⏏
    * [decode(input)](#exp_module_base64url-universal--decode) ⇒ <code>Uint8Array</code> ⏏

<a name="exp_module_base64url-universal--encode"></a>

### encode(input) ⇒ <code>string</code> ⏏
Encodes input according to the "Base64url Encoding" format as specified
in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and
trailing '=', line breaks, whitespace, and other characters are omitted.

**Kind**: Exported function  
**Returns**: <code>string</code> - the encoded value.  

| Param | Type | Description |
| --- | --- | --- |
| input | <code>Uint8Array</code> \| <code>string</code> | the data to encode. |

<a name="exp_module_base64url-universal--decode"></a>

### decode(input) ⇒ <code>Uint8Array</code> ⏏
Decodes input according to the "Base64url Encoding" format as specified
in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and
trailing '=', line breaks, whitespace, and other characters are omitted.

**Kind**: Exported function  
**Returns**: <code>Uint8Array</code> - the decoded value.  

| Param | Type | Description |
| --- | --- | --- |
| input | <code>string</code> | the data to decode. |

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