From 06cb160b4372740dea930aecd20bf8ef5ad66f2f Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 9 Mar 2018 16:49:43 +0000 Subject: Removes duplicated & non used code --- app/assets/javascripts/lib/utils/text_utility.js | 14 -------------- 1 file changed, 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. * -- cgit v1.2.1