@vortiq/eml-parse-js
Version:
Format EML file in browser environment
33 lines (32 loc) • 1.19 kB
TypeScript
import { EmailAddress } from './interface';
/**
* Builds e-mail address string, e.g. { name: 'PayPal', email: 'noreply@paypal.com' } => 'PayPal' <noreply@paypal.com>
* @param {String|EmailAddress|EmailAddress[]|null} data
*/
export declare const toEmailAddress: (data?: string | EmailAddress | EmailAddress[] | null) => string;
/**
* decode one joint
* @param {String} str
* @returns {String}
*/
export declare const decodeJoint: (str: string) => string;
/**
* Decodes 'quoted-printable'
* @param {String} value
* @param {String} charset
* @param {String} qEncoding whether the encoding is RFC-2047's Q-encoding, meaning special handling of underscores.
* @returns {String}
*/
export declare const unquotePrintable: (value: string, charset?: string, qEncoding?: boolean) => string;
/**
* decode section
* @param {String} str
* @returns {String}
*/
export declare const unquoteString: (str: string) => string;
/**
* Gets name and e-mail address from a string, e.g. 'PayPal' <noreply@paypal.com> => { name: 'PayPal', email: 'noreply@paypal.com' }
* @param {String} raw
* @returns {EmailAddress[]}
*/
export declare const getEmailAddress: (rawStr: string) => EmailAddress[];