4 ms·
Well, it's polluting the global window scope with all those helpers. That's a reason to never use this imo. There are plenty of other jquery-lite helper libra
by hoten 2y ago
Well, it's polluting the global window scope with all those helpers.
That's a reason to never use this imo.
There are plenty of other jquery-lite helper libraries out there. 95 percent the utility with hardly any cost in terms of script size.
Converting querySelectorAll to an array is honestly most of the benefit of these libraries.
- spankalee 2y ago> 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).
- xPaw 2y agoYou don't need to convert querySelectorAll to an array, you can directly iterate it, or use forEach.
- meow_catrix 2y agoNot if you want to map or reduce it.