DEV Community

Ed Link III
Ed Link III

Posted on

My First Release: JS Query

I started tinkering with the concept of replacing jQuery a while back, and I've finally finished it. Not really, I just started making major changes to it and decided I should put out a 1.0 release of it in it's current state. (Luckily, GitHub makes that pretty easy.)

Honestly, it all started with me not wanting to change el.hasClass() to el.classList.contains()!

The most important thing to me in writing this was to make sure it was completely compatible with Vanilla JavaScript:
$q('#my_id').textContext('Hello World')

The second most important thing was to make as many of the calls as possible (and made sense to be) chainable:
el.removeClass('active').addClass('blue')

It is being used in production in one of my current employer's applications. However, I write code for a controlled environment - this library is not exactly IE safe. Personally, I've never tested it to see what all would break (if someone would like to do that and update the docs, cool!), but it is pretty dependent on modern browsers and their ability to use modern JavaScript.

I hope you enjoy playing with it as much as I enjoyed writing it.

So, here it is, for your consideration: JS Query v1.0

Top comments (0)