lib/Utils.js
function validateColumns(columns) {
  if (!columns) {
    return;
  }

  // check IDs
  var ids = {};
  columns.forEach(function (column, i) {
    var id = column.id;

    if (!ids[id]) {
      ids[id] = [i];
    } else {
      ids[id].push(i);
    }
  });
  Object.keys(ids).forEach(function (id) {
    if (ids[id].length > 1) {
      console.warn('Column ID \'' + id + '\' used in multiple columns ' + ids[id].join(', '), ids[id].map(function (index) {
        return columns[index];
      }));
    }
  });
}
function validateColumns(columns) {
  if (!columns) {
    return;
  }

  // check IDs
  var ids = {};
  columns.forEach(function (column, i) {
    var id = column.id;

    if (!ids[id]) {
      ids[id] = [i];
    } else {
      ids[id].push(i);
    }
  });
  Object.keys(ids).forEach(function (id) {
    if (ids[id].length > 1) {
      console.warn('Column ID \'' + id + '\' used in multiple columns ' + ids[id].join(', '), ids[id].map(function (index) {
        return columns[index];
      }));
    }
  });
}
function validateColumns ( columns ) { if ( ! columns ) { return ; } // check IDs var ids = { } ; columns . forEach ( function ( column , i ) { var id = column . id ; if ( ! ids [ id ] ) { ids [ id ] = [ i ] ; } else { ids [ id ] . push ( i ) ; } } ) ; Object . keys ( ids ) . forEach ( function ( id ) { if ( ids [ id ] . length > 1 ) { console . warn ( 'Column ID \'' + id + '\' used in multiple columns ' + ids [ id ] . join ( ', ' ) , ids [ id ] . map ( function ( index ) { return columns [ index ] ; } ) ) ; } } ) ; }
Checks an array of column definitions to see if there are any issues.
Checks if

- multiple columns have the same ID

Typically only used in development.

@param {Object[]} columns The column definitions for the whole table
@returns {void}
Checks an array of column definitions to see if there are any issues . Checks if