mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Add credits, and a "decode" function.
This commit is contained in:
1 parent
2f9722cca0
commit
4a615ddd9c
1 file changed
+16
+16
@@ -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
|
||||
|
||||
Reference in new issue
Block a user