Add credits, and a "decode" function.

This commit is contained in:
isaacs authored and Ryan Dahl committed 2009-12-18 18:59:02 +01:00
1 parent 2f9722cca0
commit 4a615ddd9c
1 file changed
+16
+16
View File
@@ -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