Actually made operations work (and made the module 8MB)

Unfortunately they need jsdom
This commit is contained in:
Matt 2019-03-10 11:44:02 +00:00
parent 4ae875601a
commit f8874fc586
8 changed files with 211 additions and 201 deletions

View file

@ -50,7 +50,6 @@ export function getValues(input, recordDelimiter, fieldDelimiter, columnHeadings
.split(recordDelimiter)
.forEach((row, rowIndex) => {
const split = row.split(fieldDelimiter);
if (split.length !== length) throw new OperationError(`Each row must have length ${length}.`);
if (columnHeadingsAreIncluded && rowIndex === 0) {
@ -59,7 +58,6 @@ export function getValues(input, recordDelimiter, fieldDelimiter, columnHeadings
values.push(split);
}
});
return { headings, values};
}