/**
 *
 * @param tableNode
 * @example
 */
export function convertProsemirrorTableNodeToArrayOfRows(tableNode) {
  const result = [];
  tableNode.forEach(rowNode => {
    if (rowNode.type.name === 'tableRow') {
      const row = [];
      rowNode.forEach(n => row.push(n));
      result.push(row);
    }
  });
  return result;
}