Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skywa04885/llibemailaddress


https://github.com/skywa04885/llibemailaddress

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# Luke Email-Address Library

Simple E-Mail address class / parser, which I can share across projects.

# Usage

```ts
import { EmailAddress } from 'llibemailaddress';

const address1 = new EmailAddress(
'luke.rieff', /* Username */
'gmail.com', /* Hostname */
'Luke Rieff' /* Name */
);
const address2 = EmailAddress.fromAddress('[email protected]', 'Luke Rieff');
const address3 = EmailAddress.decode('"Luke Rieff" ');

console.log(address1.encode());
/* Luke Rieff */
console.log(address2.address)
/* [email protected] */

```