News for hackers. Stuff that matters.
Re:Bling – the $ of jQuery without the jQuery by zodiakzz on Monday June 15, 2015 @05:12AM (#9718263)
I prefer:-

  function $(q, parent) { return (parent || document).querySelector(q); }
Re:Bling – the $ of jQuery without the jQuery by egeozcan on Monday June 15, 2015 @05:36AM (#9718344)
I'd also wrap it in a `[].slice.call`:

    function $(q, parent) {
        parent = parent || document;
        return [].slice.call(parent.querySelectorAll(q));
    }
Re:Bling – the $ of jQuery without the jQuery by marcoms on Monday June 15, 2015 @09:45AM (#9719210)
Also see ES2015's Array.from()

    Array.from(<NodeList or other iterable>)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...