Commit 56a04158 authored by Clement Ho's avatar Clement Ho

Fix potential EE conflict

parent cd0ae854
...@@ -136,6 +136,7 @@ window.dateFormat = dateFormat; ...@@ -136,6 +136,7 @@ window.dateFormat = dateFormat;
* @param {Number} seconds * @param {Number} seconds
* @return {String} * @return {String}
*/ */
// eslint-disable-next-line import/prefer-default-export
export function timeIntervalInWords(intervalInSeconds) { export function timeIntervalInWords(intervalInSeconds) {
const secondsInteger = parseInt(intervalInSeconds, 10); const secondsInteger = parseInt(intervalInSeconds, 10);
const minutes = Math.floor(secondsInteger / 60); const minutes = Math.floor(secondsInteger / 60);
......
...@@ -17,16 +17,6 @@ export const addDelimiter = text => (text ? text.toString().replace(/\B(?=(\d{3} ...@@ -17,16 +17,6 @@ export const addDelimiter = text => (text ? text.toString().replace(/\B(?=(\d{3}
*/ */
export const highCountTrim = count => (count > 99 ? '99+' : count); 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 * Converst first char to uppercase and replaces undercores with spaces
* @param {String} string * @param {String} string
...@@ -65,3 +55,12 @@ export const slugify = str => str.trim().toLowerCase(); ...@@ -65,3 +55,12 @@ export const slugify = str => str.trim().toLowerCase();
*/ */
export const truncate = (string, maxLength) => `${string.substr(0, (maxLength - 3))}...`; 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)}`;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment