diff --git a/lib/helpers/AxiosURLSearchParams.js b/lib/helpers/AxiosURLSearchParams.js index 7c49f18..a141349 100644 --- a/lib/helpers/AxiosURLSearchParams.js +++ b/lib/helpers/AxiosURLSearchParams.js @@ -2,6 +2,14 @@ var toFormData = require('./toFormData'); +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ function encode(str) { var charMap = { '!': '%21', @@ -17,6 +25,14 @@ function encode(str) { }); } +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ function AxiosURLSearchParams(params, options) { this._pairs = [];