-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
405 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ env: | |
node: true | ||
es6: true | ||
mocha: true | ||
es2023: true | ||
es2022: true | ||
|
||
extends: ["@haraka"] | ||
extends: ['@haraka'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ env: | |
jobs: | ||
publish: | ||
uses: haraka/.github/.github/workflows/publish.yml@master | ||
secrets: inherit | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
singleQuote: true | ||
semi: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
[![Code Climate][clim-img]][clim-url] | ||
[![Coverage Status][cov-img]][cov-url] | ||
|
||
|
||
# address-rfc2822 | ||
|
||
Parser for RFC 2822 & 5322 (Header) format email addresses. | ||
|
@@ -18,24 +17,23 @@ It is almost a direct port of the perl module Mail::Address and I'm grateful to | |
## Usage | ||
|
||
```js | ||
const addrparser = require('address-rfc2822'); | ||
const addrparser = require('address-rfc2822') | ||
|
||
const addresses = addrparser.parse("Matt Sergeant <[email protected]>"); | ||
const address = addresses[0]; | ||
const addresses = addrparser.parse('Matt Sergeant <[email protected]>') | ||
const address = addresses[0] | ||
|
||
console.log(`Email address: ${address.address}`); // [email protected] | ||
console.log(`Email name: ${address.name()}`); // Matt Sergeant | ||
console.log(`Reformatted: ${address.format()}`); // Matt Sergeant <[email protected]> | ||
console.log(`User part: ${address.user()}`); // helpme+npm | ||
console.log(`Host part: ${address.host()}`); // gmail.com | ||
console.log(`Email address: ${address.address}`) // [email protected] | ||
console.log(`Email name: ${address.name()}`) // Matt Sergeant | ||
console.log(`Reformatted: ${address.format()}`) // Matt Sergeant <[email protected]> | ||
console.log(`User part: ${address.user()}`) // helpme+npm | ||
console.log(`Host part: ${address.host()}`) // gmail.com | ||
``` | ||
|
||
## More Info | ||
|
||
- [RFC 2822](https://tools.ietf.org/html/rfc2822) | ||
- [RFC 5322](https://tools.ietf.org/html/rfc5322) | ||
|
||
|
||
## License | ||
|
||
This module is MIT licensed. | ||
|
Oops, something went wrong.