code: function truncate (element, options) {
    const truncator = new Truncator(element, options)
    if (truncator) {
      return truncator.truncate()
    }
  }
docs: ---
  parent: TruncateText
  ---
  Truncate the text content of an HTML element and its children.
  
  @param {DOMNode} element A single element containing the content to be truncated.
  @param {Object} options={} The options object.
  @param {DOMNode} options.parent An optional parent element to use for calculations.
  @param {number|string} options.maxLines Number of lines to allow before truncating.
  @param {string} options.position=end Where to place the ellipsis within the string.
  @param {string} options.truncate=character Add ellipsis after words or after any character.
  @param {string} options.ellipsis=\u2026 Where to place the ellipsis within the string.
  @param {string[]} options.ignore Characters to ignore at truncated end of string.
  @param {number} options.lineHeight=1.2 Unitless multiplier to use in case element can have
  'normal' lineHeight. Adjust this to better match your font if needed.