Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skywa04885/llibemailaddress
https://github.com/skywa04885/llibemailaddress
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/skywa04885/llibemailaddress
- Owner: skywa04885
- Created: 2022-07-05T15:29:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-05T15:32:55.000Z (over 2 years ago)
- Last Synced: 2024-11-12T00:37:06.909Z (2 months ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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] */```