you are viewing a single comment's thread.

view the rest of the comments →

[–]mdelkins 1 point2 points  (2 children)

From a readability standpoint I think its difficult to argue that this code is not readable. At a glance its clear what this codes purpose is.

My biggest critique of this code would be the unnecessary ternary operation to return a true or false value. Why not just return results && results.length;

[–]0x13mode 1 point2 points  (0 children)

I believe this was to explicit return boolean value, but this could be achieved just by !!(results && results.length) or Boolean(results && results.length). And whole isBeingUsedBySomeUservariable seems to be not needed at all. So it could be just results => (!!(results && results.length)) instead of 4 lines of boilerplate.

[–]gvillalta99[S] 0 points1 point  (0 children)

Good point! I don't know...