News for hackers. Stuff that matters.
Re:Bling – the $ of jQuery without the jQuery by vortico on Monday June 15, 2015 @05:11AM (#9718257)
This is all I personally ever need.

  function $(q) { return document.querySelector(q) }
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...
Re:Bling – the $ of jQuery without the jQuery by bodhi on Monday June 15, 2015 @05:40AM (#9718360)
If we're golfing,

    $ = document.querySelector.bind(document);
would be sufficient? ;)
Re:Bling – the $ of jQuery without the jQuery by takle on Monday June 15, 2015 @05:53AM (#9718397)
(var | let | const) $ = ::document.querySelector;

with experimental ES7 syntax :D https://github.com/zenparsing/es-function-bind

Re:Bling – the $ of jQuery without the jQuery by bodhi on Monday June 15, 2015 @08:19AM (#9718841)
Huh, my joke actually turned into me learning something, thanks!
Re:Bling – the $ of jQuery without the jQuery by takle on Monday June 15, 2015 @10:00AM (#9719290)
Hehe, You're welcome – I do take golfing very serious ;)