|
|
@ -3,11 +3,27 @@ |
|
|
|
* A URI parser, compliant with assorted RFCs, providing parsing and resolution utilities. |
|
|
|
**/ |
|
|
|
|
|
|
|
/* |
|
|
|
Blatantly stolen with permission from Narwhal, which did the same from Chiron, |
|
|
|
and bits taken from parseUri 1.2.1 (c) 2007 Steven Levithan <stevenlevithan.com> MIT License, |
|
|
|
and probably also plagiarizing http://code.google.com/p/js-uri/ in some ways.
|
|
|
|
Most lines have been changed, please don't blame any of the above persons for |
|
|
|
any errors in this file. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
exports.parse = uri_parse; |
|
|
|
exports.format = uri_format; |
|
|
|
exports.resolve = uri_resolve; |
|
|
|
exports.resolveObject = uri_resolveObject; |
|
|
|
exports.decode = uri_decode; |
|
|
|
|
|
|
|
/**** |
|
|
|
Decode a URI, replacing + with space |
|
|
|
*/ |
|
|
|
function uri_decode (s) { |
|
|
|
return decodeURIComponent(s.replace(/\+/g, ' ')); |
|
|
|
} |
|
|
|
|
|
|
|
/**** expressionKeys |
|
|
|
members of a parsed URI object that you get |
|
|
|