Determinar el texto truncate javaScript

/**
 * Check if an element is truncated.
 */
function isTruncated(el) {
  return el.scrollWidth > el.clientWidth
}
nj-coder