Comparing version 1.0.0 to 2.0.0
@@ -119,3 +119,3 @@ define(['./uri'], function(Uri) { | ||
if (value !== null && typeof value !== 'undefined') { | ||
if (value !== null && typeof value !== 'undefined' && !(Array.isArray(value) && value.length === 0)) { | ||
allowReserved = operator === '+' || operator === '#'; | ||
@@ -196,3 +196,3 @@ | ||
if (!transformedMatch) { | ||
if (!transformedMatch || transformedMatch.length === 0) { | ||
return ''; | ||
@@ -199,0 +199,0 @@ } |
{ | ||
"name": "be-hippo", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "A PropositionH hypermedia consumer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -53,8 +53,19 @@ define(['lib/uritemplate'], function(UriTemplate) { | ||
var variables = { | ||
count: ["one", "two", "three"], | ||
dom: ["example", "com"], | ||
dub: "me/too", | ||
hello: "Hello World!", | ||
half: "50%", | ||
var: "value", | ||
hello: "Hello World!", | ||
empty: "", | ||
who: "fred", | ||
base: "http://example.com/home/", | ||
path: "/foo/bar", | ||
list: ["red", "green", "blue"], | ||
keys: { semi: ';', dot: '.', comma: ',' }, | ||
v: "6", | ||
x: "1024", | ||
y: "768" | ||
y: "768", | ||
empty: "", | ||
empty_keys: [], | ||
undef: null | ||
}, | ||
@@ -70,2 +81,9 @@ testcases = [ | ||
["X{.x,y}", "X.1024.768"], | ||
["X{.empty}", "X."], | ||
["X{.undef}", "X"], | ||
["X{.empty_keys}", "X"], | ||
["X{.empty_keys*}", "X"], | ||
["X{.undef}", "X"], | ||
["{/empty}", "/"], | ||
["{/undef}", ""], | ||
["{/var}", "/value"], | ||
@@ -72,0 +90,0 @@ ["{/var,x}/here", "/value/1024/here"], |
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
64433
1706