Socket
Socket
Sign inDemoInstall

email-addresses

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email-addresses - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

lib/email-addresses.js
// email-addresses.js - RFC 5322 email address parser
// v 2.0.0
// v 2.0.1
//

@@ -466,3 +466,3 @@ // http://tools.ietf.org/html/rfc5322

function phrase() {
return wrap('phrase', or(star(word, 1), obsPhrase)());
return wrap('phrase', or(obsPhrase, star(word, 1))());
}

@@ -469,0 +469,0 @@

{
"version": "2.0.0",
"version": "2.0.1",
"name": "email-addresses",

@@ -4,0 +4,0 @@ "description": "An email address parser based on rfc5322",

@@ -6,3 +6,3 @@ email-addresses.js

v 2.0.0
v 2.0.1

@@ -9,0 +9,0 @@ What?

@@ -255,2 +255,27 @@ var fs = require("fs"),

test("dots in unquoted display-names", function (t) {
var fxn, result;
fxn = addrs.parseOneAddress;
result = fxn("H.P. Lovecraft <foo@bar.net>");
t.ok(result, "dots in the middle of an unquoted display-name with spaces (obs-phrase production)");
result = fxn("Hmm Yes Info. <foo@bar.net>");
t.ok(result, "dots to end an unquoted display-name (obs-phrase production)");
result = fxn("bar.net <foo@bar.net>");
t.ok(result, "dots in the middle of an unquoted display-name without spaces (obs-phrase production)");
result = fxn({ input: "H.P. Lovecraft <foo@bar.net>", strict: true });
t.notOk(result, "dots without using 'obsolete' productions");
result = fxn({ input: "Hmm Yes Info. <foo@bar.net>", strict: true });
t.notOk(result, "dots without using 'obsolete' productions");
result = fxn({ input: "bar.net <foo@bar.net>", strict: true });
t.notOk(result, "dots without using 'obsolete' productions");
t.end();
});
function isEmailTest(t, data) {

@@ -257,0 +282,0 @@ var nodes = getNodes(data, "//test");

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