function trimText(input) {
  const maxLength = config.maxTextLength;
  const ellipsis = config.ellipsis;
  const keepLength = maxLength - ellipsis.length;
  let text = input.trim();

  if (text.length > maxLength) {
    text = `${text.substring(0, keepLength)}${ellipsis}`;
  }

  return text;
}
/**
 * Trims given input with an ellipsis if its length is greater than 255|maxTextLength characters.
 * @param {string} input
 * @return {string}
 */
Trims given input with an ellipsis if its length is greater than 255|maxTextLength characters.
@param {string} input
@return {string}
Trims given input with an ellipsis if its length is greater than 255|maxTextLength characters . @param { string } input @return { string }
function trimText(input) {
  const maxLength = config.maxTextLength;
  const ellipsis = config.ellipsis;
  const keepLength = maxLength - ellipsis.length;
  let text = input.trim();
  if (text.length > maxLength) {
    text = `${text.substring(0, keepLength)}${ellipsis}`;
  }
  return text;
}
function trimText ( input ) { const maxLength = config . maxTextLength ; const ellipsis = config . ellipsis ; const keepLength = maxLength - ellipsis . length ; let text = input . trim ( ) ; if ( text . length > maxLength ) { text = ` ${ text . substring ( 0 , keepLength ) } ${ ellipsis } ` ; } return text ; }
Trims given input with an ellipsis if its length is greater than 255|maxTextLength characters.
Trims given input with an ellipsis if its length is greater than 255|maxTextLength characters .