Closed ChrisLane closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/mishajw/vaxtldr-uk/5vhKgsTMwqmdd6WRcsmSQcptv7xb
✅ Preview: https://vaxtldr-uk-git-fork-chrislane-clean-js-mishajw.vercel.app
Obviously this is personal preference. :shrug:
Side note: csv not being immutable, needing to load the file twice due to filtering/mapping operations is annoying #ImmutableByDefault
Hmm, not sure if the CSV objects are mutable or not, but I don't think we modify them at all. AFAIU, the filter/map/etc. functions are the standard list functions, and don't mutate the underlying object. We only load each CSV once though - there are two, latest.csv and line.csv - maybe that's the problem you saw?
Side note: csv not being immutable, needing to load the file twice due to filtering/mapping operations is annoying #ImmutableByDefault
Hmm, not sure if the CSV objects are mutable or not, but I don't think we modify them at all. AFAIU, the filter/map/etc. functions are the standard list functions, and don't mutate the underlying object. We only load each CSV once though - there are two, latest.csv and line.csv - maybe that's the problem you saw?
Ah yep, I read them both as being latest.csv so that will have been the issue, however, filter will return a new collection but the objects within that collection still reference the same as before I think. If it's just primitives then the whole thing will be new.
WOOP WOOP! :tada:
.then
instead ofawait
. await is cleaner in some cases but using it everywhere seems a bit silly, making everything synchronous :PSide note: csv not being immutable, needing to load the file twice due to filtering/mapping operations is annoying #ImmutableByDefault