You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
The parser will return an error, that the last row does not have the correct number of columns. It appears that the trim behavior is inconsistent between the header row and the last data row in the absence of a trailing newline. This may be an edge case, or this may be the desired behavior, but it was surprising to me. Please feel free to close this issue if this is the desired behavior.
Thanks, can you clarify whether this is a bug or expected behavior? We have an external data source that provides files formatted like "testB" above. We currently append an extra newline, and I would like to document whether that is a workaround, or the correct behavior for using csv-parse.
Under the following conditions,
trim
option is enabled.The parser will return an error, that the last row does not have the correct number of columns. It appears that the trim behavior is inconsistent between the header row and the last data row in the absence of a trailing newline. This may be an edge case, or this may be the desired behavior, but it was surprising to me. Please feel free to close this issue if this is the desired behavior.
Sample Code (using csv-parse@1.1.7)
The text was updated successfully, but these errors were encountered: