email-addresses
Advanced tools
Comparing version 2.0.0 to 2.0.1
// 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"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94204
1107