From 0b3af019563fd59744dfcab586e24d6789712dfc Mon Sep 17 00:00:00 2001 From: Edina Bolkeny Date: Thu, 30 Jun 2022 10:50:28 +0100 Subject: [PATCH] Remove commented code --- lib/utils/mout.js | 42 ----------------------------------------- test/utils/mout_test.js | 2 -- 2 files changed, 44 deletions(-) diff --git a/lib/utils/mout.js b/lib/utils/mout.js index 5df816a..a4c24d8 100644 --- a/lib/utils/mout.js +++ b/lib/utils/mout.js @@ -33,46 +33,6 @@ function startsWith (str, prefix) { return str.indexOf(prefix) === 0; } -// function setParam (url, paramName, value) { -// url = url || ''; -// -// let re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); -// let param = paramName +'='+ encodeURIComponent( value ); -// -// if ( re.test(url) ) { -// return url.replace(re, '$1'+ param); -// } else { -// if (url.indexOf('?') === -1) { -// url += '?'; -// } -// if (url.indexOf('=') !== -1) { -// url += '&'; -// } -// return url + param; -// } -// -// } -// -// const DEFAULT_DICTIONARY = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; -// function randString (length, dictionary) { -// if (!_.isNumber(length) || length <= 0) { -// length = 8; -// } -// -// if (!_.isString(dictionary) || dictionary.length < 1) { -// dictionary = DEFAULT_DICTIONARY; -// } -// -// let result = ''; -// const domain = dictionary.length - 1; -// -// while (length--) { -// result += dictionary[_.random(0, domain, false)]; -// } -// -// return result; -// } - function replaceAccents (str) { str = _.toString(str); @@ -204,8 +164,6 @@ module.exports = { randHex, guid, startsWith, - // setParam, - // randString, camelCase, unCamelCase, sentenceCase, diff --git a/test/utils/mout_test.js b/test/utils/mout_test.js index 5b25b69..f18b5d2 100644 --- a/test/utils/mout_test.js +++ b/test/utils/mout_test.js @@ -4,8 +4,6 @@ const { randHex, guid, startsWith, - setParam, - randString, camelCase, unCamelCase, sentenceCase,