# lettercoder

> Quoted-printable (RFC 2045) and mime word (RFC 2047) decoding

Latest version **0.1.1** (published 2024-01-12) · BSD-3-Clause-Clear license · 0 weekly downloads

## Install

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

## 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.1.1 |
| Published | 2024-01-12 |
| First published | 2020-04-03 |
| Weekly downloads | 0 |
| License | BSD-3-Clause-Clear |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mat Sz |
| Maintainers | mat-sz |
| Keywords | email, e-mail, mail, mime, quoted-printable, mime-message, decoder, typescript, isomorphic |

## Links

- npm: https://www.npmjs.com/package/lettercoder
- Repository: https://github.com/mat-sz/lettercoder
- Issues: https://github.com/mat-sz/lettercoder/issues
- npm.io page: https://npm.io/package/lettercoder

## Dependencies (1)

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

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2024-01-12
- 0.1.0 — 2024-01-04
- 0.0.7 — 2023-09-26
- 0.0.6 — 2023-03-28
- 0.0.5 — 2022-09-12
- 0.0.4 — 2021-03-16
- 0.0.3 — 2020-04-05
- 0.0.2 — 2020-04-05
- 0.0.1 — 2020-04-03

## README

<h1 align="center">
  lettercoder
</h1>

<p align="center">
<img alt="workflow" src="https://img.shields.io/github/actions/workflow/status/mat-sz/lettercoder/node.js.yml?branch=master">
<a href="https://npmjs.com/package/lettercoder">
<img alt="npm" src="https://img.shields.io/npm/v/lettercoder">
<img alt="npm" src="https://img.shields.io/npm/dw/lettercoder">
<img alt="NPM" src="https://img.shields.io/npm/l/lettercoder">
</a>
</p>

**lettercoder** is an isomorphic decoding library for e-mail related applications written in TypeScript.

The following RFCs are supported by lettercoder:

- [RFC 2045](https://tools.ietf.org/html/rfc2045.html) (Quoted-Printable)
- [RFC 2047](https://tools.ietf.org/html/rfc2047.html) (MIME Words)

## Usage

### String with mixed MIME words and regular words (RFC 2047)

```ts
import { decodeMimeWords } from 'lettercoder';

decodeMimeWords('=?ISO-8859-1?Q?a?= b'); // a b
```

### One MIME word (RFC 2047)

```ts
import { decodeMimeWord } from 'lettercoder';

decodeMimeWords('=?ISO-8859-1?Q?a?='); // a
```

### Quoted-Printable: UTF-8 (RFC 2045)

```ts
import { decodeQuotedPrintable } from 'lettercoder';

decodeQuotedPrintable('=F0=9F=91=8D', 'utf-8'); // 👍
```

### Quoted-Printable: Byte array (RFC 2045)

```ts
import { decodeQuotedPrintable } from 'lettercoder';

decodeQuotedPrintable('=DE=AD=BE=EF'); // Uint8Array(4) [ 222, 173, 190, 239 ]
```

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