"use strict";exports.__esModule = true;exports.truncate = void 0;var truncate = exports.truncate = function truncate(truncateString, maxLength, separator) {if (separator === void 0) {separator = '...';}
  if (truncateString.length <= maxLength) {
    return truncateString;
  }

  var separatorLength = separator.length;
  var charsCountToShow = maxLength - separatorLength;

  var frontCharsCount = Math.ceil(charsCountToShow / 2);
  var backCharsCount = Math.floor(charsCountToShow / 2);

  return "" + truncateString.substr(0, frontCharsCount) + separator + truncateString.substr(
    truncateString.length - backCharsCount
  );
};