News for hackers. Stuff that matters.
Re:Removing jQuery from GitHub.com frontend by megous on Thursday July 26, 2018 @06:31AM (#17616368)
Re 2.:

el.querySelectorAll('abc').map(el => ...)...

You may need to copy some methods you'd like to use from Array.prototype to NodeList.prototype though, or use .values() from NodeList everywhere.

Re:Removing jQuery from GitHub.com frontend by masklinn on Thursday July 26, 2018 @07:47AM (#17616665)
That's manual iteration even if it's done via HoF.

Many of jQuery's operations implicitly apply to the entire nodeset regardless of the nodeset's arity.

Re:Removing jQuery from GitHub.com frontend by girvo on Thursday July 26, 2018 @09:48AM (#17617443)
Fair point, though for dynamic and large DOMs I dislike having to go and check whether I’m touching more than one element sometimes — not always though, sometimes it great to just $(‘#bleh’).hide() or what have you! Depends really
Re:Removing jQuery from GitHub.com frontend by masklinn on Thursday July 26, 2018 @11:05AM (#17618022)
That's completely fair, and there are cases where unknowingly selecting and applying complex operations to many nodes is problematic but I think it's a great baseline/default regardless.
Re:Removing jQuery from GitHub.com frontend by mercer on Thursday July 26, 2018 @07:45AM (#17616654)
I usually add: const qs = (selector) => [...document.querySelectorAll(selector)]

so that I can tread my results as a normal array.