Comparing version 0.2.2 to 0.3.0
{ | ||
"name": "lil-uri", | ||
"description": "Tiny URI parser and builder with chainable API", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "lil-js/uri", |
@@ -24,3 +24,7 @@ /*! lil-uri - v0.2.0 - MIT License - https://github.com/lil-js/uri */ | ||
function decode (uri) { | ||
return decodeURIComponent(escape(uri)) | ||
try{ | ||
return decodeURIComponent(uri) | ||
}catch(e){ | ||
return unescape(uri) | ||
} | ||
} | ||
@@ -155,3 +159,3 @@ | ||
} else { | ||
return name + (p.query[name] ? '=' + p.query[name] : '') | ||
return name + (p.query[name] != null ? '=' + p.query[name] : '') | ||
} | ||
@@ -158,0 +162,0 @@ }).join('&'))) |
30453
491
13