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
In your example that is expected behavior, the next callback should mainly be used for async validation and an error should only be passed to the callback if an error occurs that should stop the stream processing.
Here is a slightly modified example that shows each data and data-invalid event being hit, with a final error on the last row.
I have the following snippet almost taken verbatim from the parse tests w/ in lib:
https://github.com/C2FO/fast-csv/blob/5cf10be9bc9dbc87abfce04ccf2a03dd5d1f8a9e/test/parsing.test.js
Whenever I run this code, "data-invalid" is completely bypassed and only "error" is hit.
I also looked at the code and saw that a
next(null, false)
can trigger the "data-invalid" emit event. However, every index is listed as 0.The text was updated successfully, but these errors were encountered: