"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.convertProsemirrorTableNodeToArrayOfRows = convertProsemirrorTableNodeToArrayOfRows;
/**
 *
 * @param tableNode
 * @example
 */
function convertProsemirrorTableNodeToArrayOfRows(tableNode) {
  var result = [];
  tableNode.forEach(function (rowNode) {
    if (rowNode.type.name === 'tableRow') {
      var row = [];
      rowNode.forEach(function (n) {
        return row.push(n);
      });
      result.push(row);
    }
  });
  return result;
}