@hapi/address
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -99,2 +99,3 @@ 'use strict'; | ||
rfc3986.relativeRef = '(?:' + '(?:\\/\\/' + authority + pathAbEmpty + ')' + '|' + pathAbsolute + '|' + pathNoScheme + '|' + pathEmpty + ')'; | ||
rfc3986.relativeRefCapture = '(?:' + '(?:\\/\\/' + authorityCapture + pathAbEmpty + ')' + '|' + pathAbsolute + '|' + pathNoScheme + '|' + pathEmpty + ')'; | ||
@@ -137,4 +138,6 @@ // query = *( pchar / "/" / "?" ) | ||
const relative = options.domain ? rfc.relativeRefCapture : rfc.relativeRef; | ||
if (options.relativeOnly) { | ||
return internals.wrap(rfc.relativeRef + suffix); | ||
return internals.wrap(relative + suffix); | ||
} | ||
@@ -174,3 +177,3 @@ | ||
const absolute = '(?:' + scheme + ':' + (options.domain ? rfc.hierPartCapture : rfc.hierPart) + ')'; | ||
const prefix = options.allowRelative ? '(?:' + absolute + '|' + rfc.relativeRef + ')' : absolute; | ||
const prefix = options.allowRelative ? '(?:' + absolute + '|' + relative + ')' : absolute; | ||
return internals.wrap(prefix + suffix, customScheme); | ||
@@ -177,0 +180,0 @@ }; |
{ | ||
"name": "@hapi/address", | ||
"description": "Email address and domain validation", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"repository": "git://github.com/hapijs/address", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
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
56859
2303