Closed asfktz closed 6 years ago
@asfktz personally I despise empty return statements. I realize sometimes it makes indent level too much, but the flow is clearer that way, at least to me. So I prefer not to merge this one 🙏
No Problem 😊
I'll keep it in mind for the next PRs
Hi @eshaham!
I wanted to suggest a small change in the error handling logic of
scaper.js
: Using negative conditions instead of positive ones.The way, we can first eliminate the "bad" scenarios and end up with the optimistic path at the end:
Another advantage is that when additional conditions will be added in the future, the code is less likely to grow to the right:
It's just a cosmetic change in the end.
What do you think? (: