isArrowEnabled = (arrows, direction) => {

  const arrow = arrows[direction];

  if (arrow == null && direction === 'to') {
    // if the arrow is not further specified and its direction is to
    // we regard it as enabled.
    return true;
  }

  return typeof arrow === 'object' ? arrow.enabled !== false : arrow === true;

}
@param {Object} arrows
@param {('from'|'to'|'middle')} direction
@return {boolean}