From e8dd5cb1ed7756b3df9a80e3732b9fff3b15e501 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 2 Jun 2022 20:51:32 +0200 Subject: [PATCH] docs(helpers/AxiosURLSearchParams) --- lib/helpers/AxiosURLSearchParams.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 = [];