News for hackers. Stuff that matters.
Re:TinyJS – Shorten JavaScript QuerySelect with $ and $$ by spankalee on Wednesday October 02, 2024 @04:13PM (#41724574)
> Converting querySelectorAll to an array is honestly most of the benefit of these libraries.

Now that NodeList is iterable, I don't even know that converting to an array is that useful anymore.

[...document.querySelector('div')] is pretty easy.

Iterator.from(document.querySelector('div')) too (doesn't work yet in Safari).

There are no comments on this comment yet.