When I see stuff like
const cleanInput = _.compact(input);
I have no idea what the fuck just happened. I have to open the damn documentation of lodash (or whatever else kind of library the author chose to use) to figure out what's going on.Now if that was
const cleanInput = input.filter(elem => !!elem);
I could've gotten on with my day and saved some time.
This does not need any documentation or comment.This might seem like a small issue to you, but damn, I spend a lot of time debugging random projects on GitHub, and the inability of the JavaScript community to write readable code really trips me up every time. Instead of just writing 2-3 lines other people can parse in a second or two, they spend 5 minutes looking up the relevant library function (which doesn't do what they expect half the time) to produce one shitty line of code other people will also spend 5 minutes on trying to decipher it.