2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Adding comments

This commit is contained in:
mzabriskie
2015-01-23 02:12:28 -07:00
parent bbf437ce4c
commit b4d81bd124
+8 -1
View File
@@ -11,6 +11,13 @@ function encode(val) {
replace(/%20/g, '+');
}
/**
* Build a URL by appending params to the end
*
* @param {string} url The base of the url (e.g., http://www.google.com)
* @param {object} [params] The params to be appended
* @returns {string} The formatted url
*/
module.exports = function buildUrl(url, params) {
if (!params) {
return url;
@@ -42,4 +49,4 @@ module.exports = function buildUrl(url, params) {
}
return url;
};
};