diff options
author | RaindropsSys <contact@minteck.org> | 2023-06-22 23:06:12 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-06-22 23:06:12 +0200 |
commit | 23563c7188e089929b60f9e10721c6fc43a220ff (patch) | |
tree | edfe2b009c82900d4ac27db02222d2f68dcad846 /includes/external/school/node_modules/axios/lib/helpers/buildURL.js | |
parent | 7a7a49332df7c852abbaa33c7e8e87f93d064d61 (diff) | |
download | pluralconnect-23563c7188e089929b60f9e10721c6fc43a220ff.tar.gz pluralconnect-23563c7188e089929b60f9e10721c6fc43a220ff.tar.bz2 pluralconnect-23563c7188e089929b60f9e10721c6fc43a220ff.zip |
Updated 15 files, added includes/maintenance/deleteUnusedAssets.php and deleted 4944 files (automated)
Diffstat (limited to 'includes/external/school/node_modules/axios/lib/helpers/buildURL.js')
-rw-r--r-- | includes/external/school/node_modules/axios/lib/helpers/buildURL.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/includes/external/school/node_modules/axios/lib/helpers/buildURL.js b/includes/external/school/node_modules/axios/lib/helpers/buildURL.js deleted file mode 100644 index 693b85f..0000000 --- a/includes/external/school/node_modules/axios/lib/helpers/buildURL.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -import utils from '../utils.js'; -import AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js'; - -/** - * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their - * URI encoded counterparts - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * 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 - * @param {?object} options - * - * @returns {string} The formatted url - */ -export default function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - const hashmarkIndex = url.indexOf('#'); - - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - const _encode = options && options.encode || encode; - - const serializerParams = utils.isURLSearchParams(params) ? - params.toString() : - new AxiosURLSearchParams(params, options).toString(_encode); - - if (serializerParams) { - url += (url.indexOf('?') === -1 ? '?' : '&') + serializerParams; - } - - return url; -} |