Skip to content

Commit

Permalink
Merge pull request #94 from nzzdev/release-3.1.3
Browse files Browse the repository at this point in the history
Release 3.1.3
  • Loading branch information
philipkueng authored Apr 2, 2019
2 parents 0d0da68 + 3ab01b0 commit 50c41c4
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 281 deletions.
15 changes: 4 additions & 11 deletions helpers/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,10 @@ function getColumnsType(data) {
const table = clone(data).slice(1);

Array2D.eachColumn(table, (column, columnIndex) => {
let isColumnNumeric = false;
Array2D.forColumn(table, columnIndex, cell => {
if (
isNumeric(cell) === true ||
cell === null ||
cell === "" ||
cell === "-"
) {
// if the cell is empty or is a hyphen(-), we treat it as potentially numeric here
isColumnNumeric = true;
}
let isColumnNumeric = column.every(cell => {
return (
isNumeric(cell) === true || cell === null || cell === "" || cell === "-"
);
});
columns.push({ isNumeric: isColumnNumeric });
});
Expand Down
Loading

0 comments on commit 50c41c4

Please sign in to comment.