I'd also wrap it in a `[].slice.call`:
function $(q, parent) {
parent = parent || document;
return [].slice.call(parent.querySelectorAll(q));
}