New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

address-rfc2822

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

address-rfc2822 - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

.github/workflows/ci-test-win.yml

14

Changes.md

@@ -0,1 +1,9 @@

## 2.0.6 - 2020-11-17
- replace travis/appveyor CI tests with Github Actions
- test: when splitting lines, use os.EOL
- allow @ symbol in display name #47
## 2.0.5 - 2020-06-02

@@ -6,2 +14,3 @@

## 2.0.4 - 2018-06-29

@@ -11,2 +20,3 @@

## 2.0.3 - 2018-03-01

@@ -17,2 +27,3 @@

## 2.0.2 - 2018-02-24

@@ -22,2 +33,3 @@

## 2.0.1 - 2017-06-26

@@ -27,2 +39,3 @@

## 1.0.2 - 2016-06-16

@@ -33,2 +46,3 @@

## 1.0.1 - 2016-09-23

@@ -35,0 +49,0 @@

1

index.js

@@ -18,2 +18,3 @@ 'use strict';

startAt: startAt || null,
atInDisplayName: true // allow at in display name
});

@@ -20,0 +21,0 @@

10

package.json
{
"name": "address-rfc2822",
"version": "2.0.5",
"description": "RFC 2822 (Header) email address parser",
"version": "2.0.6",
"description": "RFC 2822 & 5322 (Header) email address parser",
"main": "index.js",

@@ -12,2 +12,3 @@ "homepage": "https://github.com/haraka/node-address-rfc2822",

"rfc2822",
"rfc5322",
"mail",

@@ -17,6 +18,7 @@ "from"

"scripts": {
"test": "mocha",
"test": "npx mocha",
"lint": "npx eslint *.js test/*.js",
"lintfix": "npx eslint --fix *.js test/*.js",
"cover": "NODE_ENV=cov npx nyc --reporter=lcovonly -x test npm test"
"cover": "NODE_ENV=cov npx nyc --reporter=lcovonly npm test",
"versions": "npx dependency-version-checker check"
},

@@ -23,0 +25,0 @@ "repository": {

@@ -5,3 +5,2 @@ [![Build Status][ci-img]][ci-url]

[![Coverage Status][cov-img]][cov-url]
[![Dependencies][dep-img]][dep-url]

@@ -12,5 +11,5 @@

Parser for RFC2822 (Header) format email addresses.
Parser for RFC 2822 & 5322 (Header) format email addresses.
This module parses RFC2822 headers containing addresses such as From, To, CC, and Bcc headers.
This module parses RFC 2822 headers containing addresses such as From, To, CC, and BCC headers.

@@ -22,3 +21,3 @@ It is almost a direct port of the perl module Mail::Address and I'm grateful to the original authors of that module for the clean code and the tests.

npm install address-rfc2822
`npm install address-rfc2822`

@@ -28,12 +27,12 @@ Usage

var addrparser = require('address-rfc2822');
const addrparser = require('address-rfc2822');
var addresses = addrparser.parse("Matt Sergeant <helpme+npm@gmail.com>");
var address = addresses[0];
const addresses = addrparser.parse("Matt Sergeant <helpme+npm@gmail.com>");
const address = addresses[0];
console.log("Email address: " + address.address);
console.log("Email name: " + address.name());
console.log("Reformatted: " + address.format());
console.log("User part: " + address.user());
console.log("Host part: " + address.host());
console.log(`Email address: ${address.address}`);
console.log(`Email name: ${address.name()}`);
console.log(`Reformatted: ${address.format()}`);
console.log(`User part: ${address.user()}`);
console.log(`Host part: ${address.host()}`);

@@ -48,8 +47,6 @@

[ci-img]: https://travis-ci.org/haraka/node-address-rfc2822.svg?branch=master
[ci-url]: https://travis-ci.org/haraka/node-address-rfc2822
[ci-win-img]: https://ci.appveyor.com/api/projects/status/hj1ggvutj3m6a2yk?svg=true
[ci-win-url]: https://ci.appveyor.com/project/msimerson/node-address-rfc2822-n5mwj
[dep-img]: https://david-dm.org/haraka/node-address-rfc2822.svg
[dep-url]: https://david-dm.org/haraka/node-address-rfc2822
[ci-img]: https://github.com/haraka/node-address-rfc2822/workflows/Unix%20Tests/badge.svg
[ci-url]: https://github.com/haraka/node-address-rfc2822/actions?query=workflow%3A%22Unix+Tests%22
[ci-win-img]: https://github.com/haraka/node-address-rfc2822/workflows/Tests%20-%20Windows/badge.svg
[ci-win-url]: https://github.com/haraka/node-address-rfc2822/actions?query=workflow%3A%22Tests+-+Windows%22
[cov-img]: https://codecov.io/github/haraka/node-address-rfc2822/coverage.svg

@@ -56,0 +53,0 @@ [cov-url]: https://codecov.io/github/haraka/node-address-rfc2822?branch=master

@@ -9,8 +9,9 @@

const raw_data = fs.readFileSync(path.join(__dirname, 'emails.txt'), "UTF-8");
const EOLRE = new RegExp(require('os').EOL)
const tests = raw_data.split(/\n\n/).map(function (rows) {
const lines = rows.split(/\n/);
const lines = rows.split(EOLRE);
// console.log(lines)
if (lines[0] === '') lines.shift();
return lines.filter(function (l) { return !/^#/.test(l) });
return lines.filter((l) => { return !/^#/.test(l) });
});

@@ -29,6 +30,6 @@

const parsed = parse(test[0])[0];
// console.log('Parsed', parsed);
// console.log(`Parsed: ${parsed}`);
for (const k in details) {
assert.equal(parsed[k](), details[k], `Test '${k}' for '${parsed[k]()}' = '${details[k]}' from ${JSON.stringify(parsed)}`);
assert.strictEqual(parsed[k](), details[k], `Test '${k}' for '${parsed[k]()}' = '${details[k]}' from ${JSON.stringify(parsed)}`);
}

@@ -35,0 +36,0 @@ })

@@ -0,1 +1,5 @@

foo@example <foo@example.com>
"foo@example" <foo@example.com>
Foo@Example
"Joe & J. Harvey" <ddd @Org>, JJV @ BBN

@@ -2,0 +6,0 @@ "Joe & J. Harvey" <ddd@Org>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc