code: function getTextDirection (element) {
    if (canUseDOM) {
      if (typeof element === 'undefined' || (element === document.documentElement)) return getDefaultDir()
      return element.getAttribute('dir') || getComputedStyle(element).direction
    }
  }
docs: ---
  category: utilities/i18n
  ---
  
  Return the direction ('ltr' or 'rtl') of an element
  @param {Element} element will use the <html> element by default
  @returns {String} 'ltr' or 'rtl' (or `undefined` if no DOM is present)