diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-03-09 16:49:43 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-03-09 16:49:43 +0000 |
commit | 06cb160b4372740dea930aecd20bf8ef5ad66f2f (patch) | |
tree | f94478439dfca78210b92a941efbe06e9604b8ec | |
parent | 92e119859d40145267e3a5fcb259df69090a1e72 (diff) | |
download | gitlab-ce-fl-remove-duplicated-code.tar.gz |
Removes duplicated & non used codefl-remove-duplicated-code
-rw-r--r-- | app/assets/javascripts/lib/utils/text_utility.js | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js index c0ce0786518..94d03621bff 100644 --- a/app/assets/javascripts/lib/utils/text_utility.js +++ b/app/assets/javascripts/lib/utils/text_utility.js @@ -65,20 +65,6 @@ export function capitalizeFirstCharacter(text) { return `${text[0].toUpperCase()}${text.slice(1)}`; } -export function camelCase(str) { - return str.replace(/_+([a-z])/gi, ($1, $2) => $2.toUpperCase()); -} - -export function camelCaseKeys(obj = {}) { - return Object.keys(obj).reduce((acc, key) => { - const camelKey = camelCase(key); - return { - ...acc, - [camelKey]: obj[key], - }; - }, {}); -} - /** * Replaces all html tags from a string with the given replacement. * |