code: function tokensReducer(acc, token) {
    const { el, elStyle, elHeight, rowsLimit, rowsWrapped, options } = acc;
    if (rowsWrapped === rowsLimit + 1) {
      return { ...acc };
    }
    const textBeforeWrap = el.textContent;
    let newRowsWrapped = rowsWrapped;
    let newHeight = elHeight;
    el.innerHTML = el.innerHTML.length
      ? `${el.innerHTML}${options.delimiter}${token}${options.replaceStr}`
      : `${token}${options.replaceStr}`;
  
    if (parseFloat(elStyle.height) > parseFloat(elHeight)) {
      newRowsWrapped++;
      newHeight = elStyle.height;
  
      if (newRowsWrapped === rowsLimit + 1) {
        el.innerHTML =
          textBeforeWrap[textBeforeWrap.length - 1] === '.' && options.replaceStr === '...'
            ? `${textBeforeWrap}..`
            : `${textBeforeWrap}${options.replaceStr}`;
  
        return { ...acc, elHeight: newHeight, rowsWrapped: newRowsWrapped };
      }
    }
  
    el.textContent = textBeforeWrap.length ? `${textBeforeWrap}${options.delimiter}${token}` : `${token}`;
  
    return { ...acc, elHeight: newHeight, rowsWrapped: newRowsWrapped };
  }
docs: /*
  Copyright (C) 2017  Nicola Zambello
  
  The JavaScript code in this page is open source software licensed under MIT license
  References about this code and its license, see:
  
  https://github.com/nzambello/ellipsed