@tinypudding/puddy-lib
Advanced tools
Comparing version 1.1.32 to 1.1.33
module.exports = function (query, page, total, url = '', extraClass = '', extraClass2 = '') { | ||
// Fix URL | ||
if (url) { | ||
// Final URL Result | ||
const finalURLResult = function (sqT = '') { | ||
if (query) { return sqT + query + '&page='; } else { return 'page='; }; | ||
}; | ||
// Param Fixed | ||
const params = require('../get/queryUrlJSON')(url); | ||
if (Object.keys(params).length > 0) { | ||
if (params.page) { | ||
url = url.replace('&' + query + '=' + params.page, '').replace('?' + query + '=' + params.page, '?').replace('?&', '?'); | ||
url = url.replace(finalURLResult('&') + params.page, '').replace('?' + query + '=' + params.page, '?').replace('?&', '?'); | ||
if (Object.keys(params).length === 1) { | ||
url += query + '='; | ||
url += finalURLResult(); | ||
} else { | ||
url += '&' + query + '='; | ||
url += finalURLResult('&'); | ||
} | ||
} else { | ||
url += '&' + query + '='; | ||
url += finalURLResult('&'); | ||
} | ||
} else { | ||
url += '?' + query + '='; | ||
url += finalURLResult('?'); | ||
} | ||
} | ||
@@ -21,0 +30,0 @@ |
{ | ||
"name": "@tinypudding/puddy-lib", | ||
"version": "1.1.32", | ||
"version": "1.1.33", | ||
"description": "Essential codes to run the other repositories from the Tiny Pudding Account.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74657
1199