by egeozcan · 11y ago · 0 comments
function $(q, parent) {
parent = parent || document;
return [].slice.call(parent.querySelectorAll(q));
} Array.from(<NodeList or other iterable>)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...