3 ms·
The title ("TinyJS – Shorten JavaScript QuerySelect with $ and $$") seems to be about these two lines: window['$'] = selector => document.querySelector(sel
by SahAssar 2y ago
The title ("TinyJS – Shorten JavaScript QuerySelect with $ and $$") seems to be about these two lines:
window['$'] = selector => document.querySelector(selector)
window['$$'] = selector => Array.from(document.querySelectorAll(selector))
The other part is a small & naive (and I mean that in the best way) DOM abstraction.
I think the discussion here seems to be about one or the other, not the thing as a whole.