项目作者: mat-sz

项目描述 :
✉️ Isomorphic Quoted-Printable (RFC 2045) and MIME word (RFC 2047) decoding library.
高级语言: TypeScript
项目地址: git://github.com/mat-sz/lettercoder.git
创建时间: 2020-04-03T17:29:20Z
项目社区:https://github.com/mat-sz/lettercoder

开源协议:BSD 3-Clause Clear License

下载



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)

  1. import { decodeMimeWords } from 'lettercoder';
  2. decodeMimeWords('=?ISO-8859-1?Q?a?= b'); // a b

One MIME word (RFC 2047)

  1. import { decodeMimeWord } from 'lettercoder';
  2. decodeMimeWords('=?ISO-8859-1?Q?a?='); // a

Quoted-Printable: UTF-8 (RFC 2045)

  1. import { decodeQuotedPrintable } from 'lettercoder';
  2. decodeQuotedPrintable('=F0=9F=91=8D', 'utf-8'); // 👍

Quoted-Printable: Byte array (RFC 2045)

  1. import { decodeQuotedPrintable } from 'lettercoder';
  2. decodeQuotedPrintable('=DE=AD=BE=EF'); // Uint8Array(4) [ 222, 173, 190, 239 ]