lettercoder
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

lettercoder

workflow npm npm NPM

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

The following RFCs are supported by lettercoder:

Usage

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

import { decodeMimeWords } from 'lettercoder';

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

One MIME word (RFC 2047)

import { decodeMimeWord } from 'lettercoder';

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

Quoted-Printable: UTF-8 (RFC 2045)

import { decodeQuotedPrintable } from 'lettercoder';

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

Quoted-Printable: Byte array (RFC 2045)

import { decodeQuotedPrintable } from 'lettercoder';

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

/lettercoder/

    Package Sidebar

    Install

    npm i lettercoder

    Weekly Downloads

    1,793

    Version

    0.1.1

    License

    BSD-3-Clause-Clear

    Unpacked Size

    16 kB

    Total Files

    17

    Last publish

    Collaborators

    • mat-sz