summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/lib/utils/text_utility.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/utils/text_utility.js')
-rw-r--r--app/assets/javascripts/lib/utils/text_utility.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js
index 5f027769d4f..dc0073be5c0 100644
--- a/app/assets/javascripts/lib/utils/text_utility.js
+++ b/app/assets/javascripts/lib/utils/text_utility.js
@@ -18,16 +18,6 @@ export const addDelimiter = text => (text ? text.toString().replace(/\B(?=(\d{3}
export const highCountTrim = count => (count > 99 ? '99+' : count);
/**
- * Capitalizes first character
- *
- * @param {String} text
- * @return {String}
- */
-export function capitalizeFirstCharacter(text) {
- return `${text[0].toUpperCase()}${text.slice(1)}`;
-}
-
-/**
* Converst first char to uppercase and replaces undercores with spaces
* @param {String} string
* @requires {String}
@@ -65,3 +55,12 @@ export const slugify = str => str.trim().toLowerCase();
*/
export const truncate = (string, maxLength) => `${string.substr(0, (maxLength - 3))}...`;
+/**
+ * Capitalizes first character
+ *
+ * @param {String} text
+ * @return {String}
+ */
+export function capitalizeFirstCharacter(text) {
+ return `${text[0].toUpperCase()}${text.slice(1)}`;
+}